Changeset 43980 in vbox for trunk/src/VBox/GuestHost/OpenGL/state_tracker
- Timestamp:
- Nov 28, 2012 7:10:56 AM (12 years ago)
- svn:sync-xref-src-repo-rev:
- 82344
- Location:
- trunk/src/VBox/GuestHost/OpenGL/state_tracker
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/GuestHost/OpenGL/state_tracker/state_diff.c
r41160 r43980 346 346 } 347 347 348 CRContext * crStateSwichPrepare(CRContext *toCtx, GLboolean fMultipleContexts, GLuint idFBO) 349 { 350 CRContext *fromCtx = GetCurrentContext(); 351 352 if (!fMultipleContexts) 353 { 348 void crStateSwichPrepare(CRContext *toCtx, CRContext *fromCtx, GLuint idDrawFBO, GLuint idReadFBO) 349 { 354 350 #ifdef CR_EXT_framebuffer_object 355 if (fromCtx) 356 crStateFramebufferObjectDisableHW(fromCtx, idFBO); 357 #endif 358 } 359 return fromCtx; 360 } 361 362 void crStateSwichPostprocess(CRContext *fromCtx, GLboolean fMultipleContexts, GLuint idFBO) 363 { 364 CRContext *toCtx = GetCurrentContext();; 351 if (fromCtx) 352 crStateFramebufferObjectDisableHW(fromCtx, idDrawFBO, idReadFBO); 353 #endif 354 } 355 356 void crStateSwichPostprocess(CRContext *toCtx, CRContext *fromCtx, GLuint idDrawFBO, GLuint idReadFBO) 357 { 365 358 if (!fromCtx || !toCtx) 366 359 return; 367 360 368 if (!fMultipleContexts)369 {370 361 #ifdef CR_EXT_framebuffer_object 371 crStateFramebufferObjectReenableHW(fromCtx, toCtx, idFBO); 372 #endif 373 } 374 } 362 crStateFramebufferObjectReenableHW(fromCtx, toCtx, idDrawFBO, idReadFBO); 363 #endif 364 } -
trunk/src/VBox/GuestHost/OpenGL/state_tracker/state_framebuffer.c
r41258 r43980 775 775 776 776 DECLEXPORT(void) STATE_APIENTRY 777 crStateFramebufferObjectDisableHW(CRContext *ctx, GLuint id FBO)777 crStateFramebufferObjectDisableHW(CRContext *ctx, GLuint idDrawFBO, GLuint idReadFBO) 778 778 { 779 779 GLboolean fAdjustDrawReadBuffers = GL_FALSE; 780 780 781 if (ctx->framebufferobject.drawFB || id FBO)781 if (ctx->framebufferobject.drawFB || idDrawFBO) 782 782 { 783 783 diff_api.BindFramebufferEXT(GL_DRAW_FRAMEBUFFER, 0); … … 785 785 } 786 786 787 if (ctx->framebufferobject.readFB || idFBO)787 if (ctx->framebufferobject.readFB || idReadFBO) 788 788 { 789 789 diff_api.BindFramebufferEXT(GL_READ_FRAMEBUFFER, 0); … … 802 802 803 803 DECLEXPORT(void) STATE_APIENTRY 804 crStateFramebufferObjectReenableHW(CRContext *fromCtx, CRContext *toCtx, GLuint id FBO)804 crStateFramebufferObjectReenableHW(CRContext *fromCtx, CRContext *toCtx, GLuint idDrawFBO, GLuint idReadFBO) 805 805 { 806 806 GLuint idReadBuffer = 0, idDrawBuffer = 0; … … 812 812 idDrawBuffer = toCtx->framebufferobject.drawFB->drawbuffer[0]; 813 813 } 814 else if (id FBO && !toCtx->framebufferobject.drawFB)815 { 816 diff_api.BindFramebufferEXT(GL_DRAW_FRAMEBUFFER, id FBO);814 else if (idDrawFBO && !toCtx->framebufferobject.drawFB) 815 { 816 diff_api.BindFramebufferEXT(GL_DRAW_FRAMEBUFFER, idDrawFBO); 817 817 idDrawBuffer = GL_COLOR_ATTACHMENT0; 818 818 } … … 824 824 idReadBuffer = toCtx->framebufferobject.readFB->readbuffer; 825 825 } 826 else if (id FBO && !toCtx->framebufferobject.readFB)827 { 828 diff_api.BindFramebufferEXT(GL_READ_FRAMEBUFFER, id FBO);826 else if (idReadFBO && !toCtx->framebufferobject.readFB) 827 { 828 diff_api.BindFramebufferEXT(GL_READ_FRAMEBUFFER, idReadFBO); 829 829 idReadBuffer = GL_COLOR_ATTACHMENT0; 830 830 }
Note:
See TracChangeset
for help on using the changeset viewer.