Changeset 45201 in vbox for trunk/src/VBox/GuestHost/OpenGL
- Timestamp:
- Mar 27, 2013 10:23:49 AM (12 years ago)
- Location:
- trunk/src/VBox/GuestHost/OpenGL
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/GuestHost/OpenGL/include/cr_blitter.h
r45132 r45201 54 54 struct CR_BLITTER; 55 55 56 typedef DECLCALLBACK(int) FNCRBLT_BLITTER(struct CR_BLITTER *pBlitter, VBOXVR_TEXTURE *pSrc, const RTRECT *paSrcRect, const RTRECTSIZE *pDstSize, const RTRECT *paDstRect, uint32_t cRects, uint32_t fFlags);56 typedef DECLCALLBACK(int) FNCRBLT_BLITTER(struct CR_BLITTER *pBlitter, const VBOXVR_TEXTURE *pSrc, const RTRECT *paSrcRect, const RTRECTSIZE *pDstSize, const RTRECT *paDstRect, uint32_t cRects, uint32_t fFlags); 57 57 typedef FNCRBLT_BLITTER *PFNCRBLT_BLITTER; 58 58 59 #define CRBLT_F_LINEAR 0x00000001 60 #define CRBLT_F_OFFSCREEN 0x00000002 59 #define CRBLT_F_LINEAR 0x00000001 60 #define CRBLT_F_INVERT_SRC_YCOORDS 0x00000002 61 #define CRBLT_F_INVERT_DST_YCOORDS 0x00000004 62 #define CRBLT_F_INVERT_YCOORDS (CRBLT_F_INVERT_SRC_YCOORDS | CRBLT_F_INVERT_DST_YCOORDS) 63 64 #define CRBLT_FLAGS_FROM_FILTER(_f) ( ((_f) & GL_LINEAR) ? CRBLT_F_LINEAR : 0) 65 #define CRBLT_FILTER_FROM_FLAGS(_f) (((_f) & CRBLT_F_LINEAR) ? GL_LINEAR : GL_NEAREST) 61 66 62 67 typedef struct CR_BLITTER_SPUITEM … … 85 90 CR_BLITTER_BUFFER Indicies; 86 91 RTRECTSIZE CurrentSetSize; 87 CR_BLITTER_WINDOW *pCurrentMural;92 CR_BLITTER_WINDOW CurrentMural; 88 93 CR_BLITTER_CONTEXT CtxInfo; 89 CR_BLITTER_CONTEXT *pRestoreCtxInfo;90 CR_BLITTER_WINDOW *pRestoreMural;94 const CR_BLITTER_CONTEXT *pRestoreCtxInfo; 95 const CR_BLITTER_WINDOW *pRestoreMural; 91 96 int32_t i32MakeCurrentUserData; 92 97 SPUDispatchTable *pDispatch; 93 98 } CR_BLITTER, *PCR_BLITTER; 94 99 95 VBOXBLITTERDECL(int) CrBltInit(PCR_BLITTER pBlitter, CR_BLITTER_CONTEXT *pCtxBase, bool fCreateNewCtx, SPUDispatchTable *pDispatch); 100 DECLINLINE(GLboolean) CrBltIsInitialized(PCR_BLITTER pBlitter) 101 { 102 return !!pBlitter->pDispatch; 103 } 104 105 VBOXBLITTERDECL(int) CrBltInit(PCR_BLITTER pBlitter, const CR_BLITTER_CONTEXT *pCtxBase, bool fCreateNewCtx, SPUDispatchTable *pDispatch); 96 106 VBOXBLITTERDECL(void) CrBltTerm(PCR_BLITTER pBlitter); 97 107 … … 116 126 } 117 127 118 VBOXBLITTERDECL(void) CrBltMuralSetCurrent(PCR_BLITTER pBlitter, CR_BLITTER_WINDOW *pMural);119 DECLINLINE( CR_BLITTER_WINDOW *) CrBltMuralGetCurrent(PCR_BLITTER pBlitter)128 VBOXBLITTERDECL(void) CrBltMuralSetCurrent(PCR_BLITTER pBlitter, const CR_BLITTER_WINDOW *pMural); 129 DECLINLINE(const CR_BLITTER_WINDOW *) CrBltMuralGetCurrentInfo(PCR_BLITTER pBlitter) 120 130 { 121 return pBlitter->pCurrentMural;131 return &pBlitter->CurrentMural; 122 132 } 123 133 124 134 VBOXBLITTERDECL(void) CrBltLeave(PCR_BLITTER pBlitter); 125 VBOXBLITTERDECL(int) CrBltEnter(PCR_BLITTER pBlitter, CR_BLITTER_CONTEXT *pRestoreCtxInfo,CR_BLITTER_WINDOW *pRestoreMural);126 VBOXBLITTERDECL(void) CrBltBlitTexMural(PCR_BLITTER pBlitter, VBOXVR_TEXTURE *pSrc, const RTRECT *paSrcRects, const RTRECT *paDstRects, uint32_t cRects, uint32_t fFlags);127 VBOXBLITTERDECL(void) CrBltBlitTexTex(PCR_BLITTER pBlitter, VBOXVR_TEXTURE *pSrc, const RTRECT *pSrcRect,VBOXVR_TEXTURE *pDst, const RTRECT *pDstRect, uint32_t cRects, uint32_t fFlags);135 VBOXBLITTERDECL(int) CrBltEnter(PCR_BLITTER pBlitter, const CR_BLITTER_CONTEXT *pRestoreCtxInfo, const CR_BLITTER_WINDOW *pRestoreMural); 136 VBOXBLITTERDECL(void) CrBltBlitTexMural(PCR_BLITTER pBlitter, const VBOXVR_TEXTURE *pSrc, const RTRECT *paSrcRects, const RTRECT *paDstRects, uint32_t cRects, uint32_t fFlags); 137 VBOXBLITTERDECL(void) CrBltBlitTexTex(PCR_BLITTER pBlitter, const VBOXVR_TEXTURE *pSrc, const RTRECT *pSrcRect, const VBOXVR_TEXTURE *pDst, const RTRECT *pDstRect, uint32_t cRects, uint32_t fFlags); 128 138 VBOXBLITTERDECL(void) CrBltPresent(PCR_BLITTER pBlitter); 129 139 /* */ -
trunk/src/VBox/GuestHost/OpenGL/include/cr_server.h
r45148 r45201 14 14 #include "cr_glstate.h" 15 15 #include "cr_vreg.h" 16 #include "cr_blitter.h" 16 17 #include "spu_dispatch_table.h" 17 18 … … 320 321 * we deal with the global RootVr data directly */ 321 322 RTPOINT RootVrCurPoint; 323 324 CR_BLITTER Blitter; 322 325 323 326 /** configuration options */ -
trunk/src/VBox/GuestHost/OpenGL/util/blitter.cpp
r45132 r45201 29 29 30 30 31 int CrBltInit(PCR_BLITTER pBlitter, CR_BLITTER_CONTEXT *pCtxBase, bool fCreateNewCtx, SPUDispatchTable *pDispatch) 32 { 33 memset(pBlitter, 0, sizeof (*pBlitter)); 34 35 pBlitter->pDispatch = pDispatch; 36 31 int CrBltInit(PCR_BLITTER pBlitter, const CR_BLITTER_CONTEXT *pCtxBase, bool fCreateNewCtx, SPUDispatchTable *pDispatch) 32 { 37 33 if (pCtxBase->Base.id == 0 || pCtxBase->Base.id < -1) 38 34 { … … 41 37 } 42 38 39 memset(pBlitter, 0, sizeof (*pBlitter)); 40 41 pBlitter->pDispatch = pDispatch; 43 42 pBlitter->CtxInfo = *pCtxBase; 44 43 if (fCreateNewCtx) … … 47 46 if (!pBlitter->CtxInfo.Base.id) 48 47 { 48 memset(pBlitter, 0, sizeof (*pBlitter)); 49 49 crWarning("CreateContext failed!"); 50 50 return VERR_GENERAL_FAILURE; … … 62 62 } 63 63 64 void CrBltMuralSetCurrent(PCR_BLITTER pBlitter, CR_BLITTER_WINDOW *pMural) 65 { 66 if (pBlitter->pCurrentMural == pMural) 67 return; 68 69 pBlitter->pCurrentMural = pMural; 64 void CrBltMuralSetCurrent(PCR_BLITTER pBlitter, const CR_BLITTER_WINDOW *pMural) 65 { 66 if (pMural) 67 { 68 if (!memcmp(&pBlitter->CurrentMural, pMural, sizeof (pBlitter->CurrentMural))) 69 return; 70 memcpy(&pBlitter->CurrentMural, pMural, sizeof (pBlitter->CurrentMural)); 71 } 72 else 73 { 74 if (!pBlitter->CurrentMural.Base.id) 75 return; 76 pBlitter->CurrentMural.Base.id = 0; 77 } 78 70 79 pBlitter->Flags.CurrentMuralChanged = 1; 71 80 … … 79 88 } 80 89 81 #define CRBLT_FILTER_FROM_FLAGS(_f) (((_f) & CRBLT_F_LINEAR) ? GL_LINEAR : GL_NEAREST) 82 83 static DECLCALLBACK(int) crBltBlitTexBufImplFbo(PCR_BLITTER pBlitter, VBOXVR_TEXTURE *pSrc, const RTRECT *paSrcRect, const RTRECTSIZE *pDstSize, const RTRECT *paDstRect, uint32_t cRects, uint32_t fFlags) 90 static DECLCALLBACK(int) crBltBlitTexBufImplFbo(PCR_BLITTER pBlitter, const VBOXVR_TEXTURE *pSrc, const RTRECT *paSrcRect, const RTRECTSIZE *pDstSize, const RTRECT *paDstRect, uint32_t cRects, uint32_t fFlags) 84 91 { 85 92 GLenum filter = CRBLT_FILTER_FROM_FLAGS(fFlags); … … 92 99 const RTRECT * pSrcRect = &paSrcRect[i]; 93 100 const RTRECT * pDstRect = &paDstRect[i]; 94 if (CRBLT_F_OFFSCREEN & fFlags) 95 { 96 pBlitter->pDispatch->BlitFramebufferEXT( 97 pSrcRect->xLeft, pSrcRect->yTop, pSrcRect->xRight, pSrcRect->yBottom, 98 pDstRect->xLeft, pDstRect->yTop, pDstRect->xRight, pDstRect->yBottom, 101 int32_t srcY1; 102 int32_t srcY2; 103 int32_t dstY1; 104 int32_t dstY2; 105 int32_t srcX1 = pSrcRect->xLeft; 106 int32_t srcX2 = pSrcRect->xRight; 107 int32_t dstX1 = pDstRect->xLeft; 108 int32_t dstX2 = pDstRect->xRight; 109 110 if (CRBLT_F_INVERT_SRC_YCOORDS & fFlags) 111 { 112 srcY1 = pSrc->height - pSrcRect->yTop; 113 srcY2 = pSrc->height - pSrcRect->yBottom; 114 } 115 else 116 { 117 srcY1 = pSrcRect->yTop; 118 srcY2 = pSrcRect->yBottom; 119 } 120 121 if (CRBLT_F_INVERT_DST_YCOORDS & fFlags) 122 { 123 dstY1 = pDstSize->cy - pDstRect->yTop; 124 dstY2 = pDstSize->cy - pDstRect->yBottom; 125 } 126 else 127 { 128 dstY1 = pDstRect->yTop; 129 dstY2 = pDstRect->yBottom; 130 } 131 132 if (srcY1 > srcY2) 133 { 134 if (dstY1 > dstY2) 135 { 136 /* use srcY1 < srcY2 && dstY1 < dstY2 whenever possible to avoid GPU driver bugs */ 137 int32_t tmp = srcY1; 138 srcY1 = srcY2; 139 srcY2 = tmp; 140 tmp = dstY1; 141 dstY1 = dstY2; 142 dstY2 = tmp; 143 } 144 } 145 146 if (srcX1 > srcX2) 147 { 148 if (dstX1 > dstX2) 149 { 150 /* use srcX1 < srcX2 && dstX1 < dstX2 whenever possible to avoid GPU driver bugs */ 151 int32_t tmp = srcX1; 152 srcX1 = srcX2; 153 srcX2 = tmp; 154 tmp = dstX1; 155 dstX1 = dstX2; 156 dstX2 = tmp; 157 } 158 } 159 160 pBlitter->pDispatch->BlitFramebufferEXT(srcX1, srcY1, srcX2, srcY2, 161 dstX1, dstY1, dstX2, dstY2, 99 162 GL_COLOR_BUFFER_BIT, filter); 100 }101 else102 {103 int32_t srcY1 = pSrc->height - pSrcRect->yTop;104 int32_t srcY2 = pSrc->height - pSrcRect->yBottom;105 int32_t dstY1 = pDstSize->cy - pDstRect->yTop;106 int32_t dstY2 = pDstSize->cy - pDstRect->yBottom;107 if (srcY1 > srcY2)108 {109 if (dstY1 > dstY2)110 {111 /* use srcY1 < srcY2 && dstY1 < dstY2 whenever possible to avoid GPU driver bugs */112 int32_t tmp = srcY1;113 srcY1 = srcY2;114 srcY2 = tmp;115 tmp = dstY1;116 dstY1 = dstY2;117 dstY2 = tmp;118 }119 }120 pBlitter->pDispatch->BlitFramebufferEXT(121 pSrcRect->xLeft, srcY1, pSrcRect->xRight, srcY2,122 pDstRect->xLeft, dstY1, pDstRect->xRight, dstY2,123 GL_COLOR_BUFFER_BIT, filter);124 }125 163 } 126 164 … … 271 309 static void crBltCheckSetupViewport(PCR_BLITTER pBlitter, const RTRECTSIZE *pDstSize, bool fFBODraw) 272 310 { 273 if (!pBlitter->Flags.LastWasFBODraw != !fFBODraw 274 || pBlitter->Flags.CurrentMuralChanged 275 || pBlitter->CurrentSetSize.cx != pDstSize->cx 311 bool fUpdateViewport = pBlitter->Flags.CurrentMuralChanged; 312 if (pBlitter->CurrentSetSize.cx != pDstSize->cx 276 313 || pBlitter->CurrentSetSize.cy != pDstSize->cy) 277 314 { 278 #if 0 279 const GLdouble aProjection[] = 280 { 281 2.0 / pDstSize->cx, 0.0, 0.0, 0.0, 282 0.0, 2.0 / pDstSize->cy, 0.0, 0.0, 283 0.0, 0.0, 2.0, 0.0, 284 -1.0, -1.0, -1.0, 1.0 285 }; 286 pBlitter->pDispatch->MatrixMode(GL_PROJECTION); 287 pBlitter->pDispatch->LoadMatrixd(aProjection); 288 pBlitter->pDispatch->Viewport(0, 0, pDstSize->cx, pDstSize->cy); 289 #else 315 pBlitter->CurrentSetSize = *pDstSize; 290 316 pBlitter->pDispatch->MatrixMode(GL_PROJECTION); 291 317 pBlitter->pDispatch->LoadIdentity(); 292 pBlitter->pDispatch->Viewport(0, 0, pDstSize->cx, pDstSize->cy);293 318 pBlitter->pDispatch->Ortho(0, pDstSize->cx, 0, pDstSize->cy, -1, 1); 294 pBlitter->pDispatch->MatrixMode(GL_TEXTURE); 295 pBlitter->pDispatch->LoadIdentity(); 296 pBlitter->pDispatch->MatrixMode(GL_MODELVIEW); 297 pBlitter->pDispatch->LoadIdentity(); 298 299 /* Clear background to transparent */ 300 pBlitter->pDispatch->ClearColor(0.0f, 0.0f, 0.0f, 0.0f); 301 #endif 302 pBlitter->CurrentSetSize.cx = pDstSize->cx; 303 pBlitter->CurrentSetSize.cy = pDstSize->cy; 304 pBlitter->Flags.LastWasFBODraw = fFBODraw; 305 if (!fFBODraw) 306 pBlitter->Flags.CurrentMuralChanged = 0; 307 } 308 } 309 310 static DECLCALLBACK(int) crBltBlitTexBufImplDraw2D(PCR_BLITTER pBlitter, VBOXVR_TEXTURE *pSrc, const RTRECT *paSrcRect, const RTRECTSIZE *pDstSize, const RTRECT *paDstRect, uint32_t cRects, uint32_t fFlags) 319 fUpdateViewport = true; 320 } 321 322 if (fUpdateViewport) 323 { 324 pBlitter->pDispatch->Viewport(0, 0, pBlitter->CurrentSetSize.cx, pBlitter->CurrentSetSize.cy); 325 pBlitter->Flags.CurrentMuralChanged = 0; 326 } 327 328 pBlitter->Flags.LastWasFBODraw = fFBODraw; 329 } 330 331 static DECLCALLBACK(int) crBltBlitTexBufImplDraw2D(PCR_BLITTER pBlitter, const VBOXVR_TEXTURE *pSrc, const RTRECT *paSrcRect, const RTRECTSIZE *pDstSize, const RTRECT *paDstRect, uint32_t cRects, uint32_t fFlags) 311 332 { 312 333 GLuint normalX, normalY; 313 uint32_t height = (fFlags & CRBLT_F_OFFSCREEN) ? 0 : pDstSize->cy; 334 uint32_t srcHeight = (fFlags & CRBLT_F_INVERT_SRC_YCOORDS) ? pSrc->height : 0; 335 uint32_t dstHeight = (fFlags & CRBLT_F_INVERT_DST_YCOORDS) ? pDstSize->cy : 0; 336 Assert(srcHeight == dstHeight); 314 337 315 338 switch (pSrc->target) … … 343 366 { 344 367 /* just optimizatino to draw a single rect with GL_TRIANGLE_FAN */ 345 bool bUseSameVerticies = paSrcRect == paDstRect && normalX == 1 && normalY == 1 ;368 bool bUseSameVerticies = paSrcRect == paDstRect && normalX == 1 && normalY == 1 && srcHeight == dstHeight; 346 369 GLfloat *pVerticies; 347 370 GLfloat *pTexCoords; … … 350 373 { 351 374 pVerticies = (GLfloat*)crBltBufGet(&pBlitter->Verticies, cElements * 2 * sizeof (*pVerticies)); 352 crBltVtRectTFNormalized(paDstRect, normalX, normalY, pVerticies, height);375 crBltVtRectTFNormalized(paDstRect, normalX, normalY, pVerticies, dstHeight); 353 376 pTexCoords = pVerticies; 354 377 } … … 356 379 { 357 380 pVerticies = (GLfloat*)crBltBufGet(&pBlitter->Verticies, cElements * 2 * 2 * sizeof (*pVerticies)); 358 pTexCoords = crBltVtRectTFNormalized(paDstRect, 1, 1, pVerticies, height);359 crBltVtRectTFNormalized(paSrcRect, normalX, normalY, pTexCoords, height);381 pTexCoords = crBltVtRectTFNormalized(paDstRect, 1, 1, pVerticies, dstHeight); 382 crBltVtRectTFNormalized(paSrcRect, normalX, normalY, pTexCoords, srcHeight); 360 383 } 361 384 … … 377 400 else 378 401 { 379 bool bUseSameVerticies = paSrcRect == paDstRect && normalX == 1 && normalY == 1 ;402 bool bUseSameVerticies = paSrcRect == paDstRect && normalX == 1 && normalY == 1 && srcHeight == dstHeight; 380 403 GLfloat *pVerticies; 381 404 GLfloat *pTexCoords; … … 387 410 { 388 411 pVerticies = (GLfloat*)crBltBufGet(&pBlitter->Verticies, cElements * 2 * sizeof (*pVerticies) + cIndicies * sizeof (*pIndicies)); 389 crBltVtRectsITNormalized(paDstRect, cRects, normalX, normalY, pVerticies, &pIndicies, &iIdxBase, height);412 crBltVtRectsITNormalized(paDstRect, cRects, normalX, normalY, pVerticies, &pIndicies, &iIdxBase, dstHeight); 390 413 pTexCoords = pVerticies; 391 414 } … … 393 416 { 394 417 pVerticies = (GLfloat*)crBltBufGet(&pBlitter->Verticies, cElements * 2 * 2 * sizeof (*pVerticies) + cIndicies * sizeof (*pIndicies)); 395 pTexCoords = crBltVtRectsITNormalized(paDstRect, cRects, 1, 1, pVerticies, &pIndicies, &iIdxBase, height);396 crBltVtRectsITNormalized(paSrcRect, cRects, normalX, normalY, pTexCoords, NULL, NULL, height);418 pTexCoords = crBltVtRectsITNormalized(paDstRect, cRects, 1, 1, pVerticies, &pIndicies, &iIdxBase, dstHeight); 419 crBltVtRectsITNormalized(paSrcRect, cRects, normalX, normalY, pTexCoords, NULL, NULL, srcHeight); 397 420 } 398 421 … … 441 464 } 442 465 466 /* defaults. but just in case */ 467 pBlitter->pDispatch->MatrixMode(GL_TEXTURE); 468 pBlitter->pDispatch->LoadIdentity(); 469 pBlitter->pDispatch->MatrixMode(GL_MODELVIEW); 470 pBlitter->pDispatch->LoadIdentity(); 471 443 472 return VINF_SUCCESS; 444 473 } … … 459 488 if (pBlitter->pRestoreCtxInfo != &pBlitter->CtxInfo) 460 489 { 461 462 pBlitter->pDispatch->MakeCurrent(pBlitter->pRestoreMural->Base.id, 0, 463 pBlitter->pRestoreCtxInfo->Base.id >= 0 464 ? pBlitter->pRestoreCtxInfo->Base.id : pBlitter->pRestoreCtxInfo->Base.id); 490 pBlitter->pDispatch->MakeCurrent(pBlitter->pRestoreMural->Base.id, 0, pBlitter->pRestoreCtxInfo->Base.id); 465 491 } 466 492 else … … 472 498 } 473 499 474 int CrBltEnter(PCR_BLITTER pBlitter, CR_BLITTER_CONTEXT *pRestoreCtxInfo,CR_BLITTER_WINDOW *pRestoreMural)475 { 476 if (!pBlitter-> pCurrentMural)500 int CrBltEnter(PCR_BLITTER pBlitter, const CR_BLITTER_CONTEXT *pRestoreCtxInfo, const CR_BLITTER_WINDOW *pRestoreMural) 501 { 502 if (!pBlitter->CurrentMural.Base.id) 477 503 { 478 504 crWarning("current mural not initialized!"); … … 498 524 } 499 525 500 pBlitter->pDispatch->MakeCurrent(pBlitter-> pCurrentMural->Base.id, pBlitter->i32MakeCurrentUserData, pBlitter->CtxInfo.Base.id);526 pBlitter->pDispatch->MakeCurrent(pBlitter->CurrentMural.Base.id, pBlitter->i32MakeCurrentUserData, pBlitter->CtxInfo.Base.id); 501 527 502 528 if (pBlitter->Flags.Initialized) … … 515 541 } 516 542 517 static void crBltBlitTexBuf(PCR_BLITTER pBlitter, VBOXVR_TEXTURE *pSrc, const RTRECT *paSrcRects, GLenum enmDstBuff, const RTRECTSIZE *pDstSize, const RTRECT *paDstRects, uint32_t cRects, uint32_t fFlags)543 static void crBltBlitTexBuf(PCR_BLITTER pBlitter, const VBOXVR_TEXTURE *pSrc, const RTRECT *paSrcRects, GLenum enmDstBuff, const RTRECTSIZE *pDstSize, const RTRECT *paDstRects, uint32_t cRects, uint32_t fFlags) 518 544 { 519 545 pBlitter->pDispatch->DrawBuffer(enmDstBuff); … … 521 547 crBltCheckSetupViewport(pBlitter, pDstSize, enmDstBuff == GL_DRAW_FRAMEBUFFER); 522 548 523 pBlitter->pfnBlt(pBlitter, pSrc, paSrcRects, pDstSize, paDstRects, cRects, fFlags & CRBLT_F_OFFSCREEN);524 } 525 526 void CrBltBlitTexMural(PCR_BLITTER pBlitter, VBOXVR_TEXTURE *pSrc, const RTRECT *paSrcRects, const RTRECT *paDstRects, uint32_t cRects, uint32_t fFlags)527 { 528 RTRECTSIZE DstSize = {pBlitter-> pCurrentMural->width, pBlitter->pCurrentMural->height};549 pBlitter->pfnBlt(pBlitter, pSrc, paSrcRects, pDstSize, paDstRects, cRects, fFlags); 550 } 551 552 void CrBltBlitTexMural(PCR_BLITTER pBlitter, const VBOXVR_TEXTURE *pSrc, const RTRECT *paSrcRects, const RTRECT *paDstRects, uint32_t cRects, uint32_t fFlags) 553 { 554 RTRECTSIZE DstSize = {pBlitter->CurrentMural.width, pBlitter->CurrentMural.height}; 529 555 530 556 pBlitter->pDispatch->BindFramebufferEXT(GL_DRAW_FRAMEBUFFER, 0); 531 557 532 crBltBlitTexBuf(pBlitter, pSrc, paSrcRects, GL_BACK, &DstSize, paDstRects, cRects, fFlags & (~CRBLT_F_OFFSCREEN));533 } 534 535 void CrBltBlitTexTex(PCR_BLITTER pBlitter, VBOXVR_TEXTURE *pSrc, const RTRECT *pSrcRect,VBOXVR_TEXTURE *pDst, const RTRECT *pDstRect, uint32_t cRects, uint32_t fFlags)558 crBltBlitTexBuf(pBlitter, pSrc, paSrcRects, GL_BACK, &DstSize, paDstRects, cRects, fFlags); 559 } 560 561 void CrBltBlitTexTex(PCR_BLITTER pBlitter, const VBOXVR_TEXTURE *pSrc, const RTRECT *pSrcRect, const VBOXVR_TEXTURE *pDst, const RTRECT *pDstRect, uint32_t cRects, uint32_t fFlags) 536 562 { 537 563 RTRECTSIZE DstSize = {(uint32_t)pDst->width, (uint32_t)pDst->height}; … … 552 578 { 553 579 if (pBlitter->CtxInfo.Base.visualBits & CR_DOUBLE_BIT) 554 pBlitter->pDispatch->SwapBuffers(pBlitter-> pCurrentMural->Base.id, 0);580 pBlitter->pDispatch->SwapBuffers(pBlitter->CurrentMural.Base.id, 0); 555 581 else 556 582 pBlitter->pDispatch->Flush();
Note:
See TracChangeset
for help on using the changeset viewer.