Changeset 39834 in vbox for trunk/src/VBox
- Timestamp:
- Jan 23, 2012 10:19:24 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/GuestHost/OpenGL/state_tracker/state_framebuffer.c
r39833 r39834 748 748 } 749 749 750 751 750 DECLEXPORT(void) STATE_APIENTRY 752 751 crStateFramebufferObjectDisableHW(CRContext *ctx) 753 752 { 753 GLboolean fAdjustDrawReadBuffers = GL_FALSE; 754 754 755 if (ctx->framebufferobject.drawFB) 756 { 755 757 diff_api.BindFramebufferEXT(GL_DRAW_FRAMEBUFFER, 0); 758 fAdjustDrawReadBuffers = GL_TRUE; 759 } 756 760 757 761 if (ctx->framebufferobject.readFB) 762 { 758 763 diff_api.BindFramebufferEXT(GL_READ_FRAMEBUFFER, 0); 759 760 if (ctx->framebufferobject.drawFB) 764 fAdjustDrawReadBuffers = GL_TRUE; 765 } 766 767 if (fAdjustDrawReadBuffers) 768 { 761 769 diff_api.DrawBuffer(GL_BACK); 762 if (ctx->framebufferobject.readFB)763 770 diff_api.ReadBuffer(GL_BACK); 771 } 764 772 765 773 if (ctx->framebufferobject.renderbuffer) … … 772 780 GLboolean fAdjustDrawReadBuffers = GL_FALSE; 773 781 774 if (fromCtx->framebufferobject.drawFB 775 && fromCtx->framebufferobject.drawFB == toCtx->framebufferobject.drawFB) 782 if (fromCtx->framebufferobject.drawFB /* <- the FBO state was reset in crStateFramebufferObjectDisableHW */ 783 && fromCtx->framebufferobject.drawFB == toCtx->framebufferobject.drawFB) /* .. and it was NOT restored properly in crStateFramebufferObjectSwitch */ 776 784 { 777 785 diff_api.BindFramebufferEXT(GL_DRAW_FRAMEBUFFER, toCtx->framebufferobject.drawFB->hwid); … … 779 787 } 780 788 781 if (fromCtx->framebufferobject.readFB 782 && fromCtx->framebufferobject.readFB == toCtx->framebufferobject.readFB) 789 if (fromCtx->framebufferobject.readFB /* <- the FBO state was reset in crStateFramebufferObjectDisableHW */ 790 && fromCtx->framebufferobject.readFB == toCtx->framebufferobject.readFB) /* .. and it was NOT restored properly in crStateFramebufferObjectSwitch */ 783 791 { 784 792 diff_api.BindFramebufferEXT(GL_READ_FRAMEBUFFER, toCtx->framebufferobject.readFB->hwid); … … 792 800 } 793 801 794 if (fromCtx->framebufferobject.renderbuffer 795 && fromCtx->framebufferobject.renderbuffer==toCtx->framebufferobject.renderbuffer) 802 if (fromCtx->framebufferobject.renderbuffer /* <- the FBO state was reset in crStateFramebufferObjectDisableHW */ 803 && fromCtx->framebufferobject.renderbuffer==toCtx->framebufferobject.renderbuffer) /* .. and it was NOT restored properly in crStateFramebufferObjectSwitch */ 796 804 { 797 805 diff_api.BindRenderbufferEXT(GL_RENDERBUFFER_EXT, toCtx->framebufferobject.renderbuffer->hwid);
Note:
See TracChangeset
for help on using the changeset viewer.