Changeset 43980 in vbox for trunk/src/VBox/GuestHost
- Timestamp:
- Nov 28, 2012 7:10:56 AM (12 years ago)
- svn:sync-xref-src-repo-rev:
- 82344
- Location:
- trunk/src/VBox/GuestHost/OpenGL
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/GuestHost/OpenGL/include/cr_glstate.h
r41160 r43980 219 219 DECLEXPORT(GLboolean) crStateEnableDiffOnMakeCurrent(GLboolean fEnable); 220 220 221 CRContext * crStateSwichPrepare(CRContext *toCtx, GLboolean fMultipleContexts, GLuint idFBO);222 void crStateSwichPostprocess(CRContext * fromCtx, GLboolean fMultipleContexts, GLuint idFBO);221 void crStateSwichPrepare(CRContext *toCtx, CRContext *fromCtx, GLuint idDrawFBO, GLuint idReadFBO); 222 void crStateSwichPostprocess(CRContext *toCtx, CRContext *fromCtx, GLuint idDrawFBO, GLuint idReadFBO); 223 223 224 224 DECLEXPORT(void) crStateFlushFunc( CRStateFlushFunc ff ); -
trunk/src/VBox/GuestHost/OpenGL/include/cr_server.h
r43932 r43980 105 105 GLboolean bReceivedRects; /*indicates if guest did any updates for visible regions*/ 106 106 107 GLuint idFBO, idColorTex, idDepthStencilRB; 107 GLuint cBuffers; 108 GLuint iBbBuffer; 109 GLuint aidFBOs[2]; 110 GLuint aidColorTexs[2]; 111 112 void *pvOutputRedirectInstance; 113 114 CRCreateInfo_t CreateInfo; 115 116 /* to avoid saved state breakage we need to keep RT_OFFSETOF(CRMuralInfo, CreateInfo) intact 117 * this is why we place some FBO stuff to the tail 118 * @todo: once we need to increment a saved state version, we could refactor this structure */ 119 GLuint iCurDrawBuffer; 120 GLuint iCurReadBuffer; 121 122 GLuint idDepthStencilRB; 108 123 GLuint fboWidth, fboHeight; 109 124 GLuint idPBO; 110 111 void *pvOutputRedirectInstance;112 113 CRCreateInfo_t CreateInfo;114 125 } CRMuralInfo; 115 126 -
trunk/src/VBox/GuestHost/OpenGL/include/state/cr_framebuffer.h
r41160 r43980 75 75 DECLEXPORT(void) STATE_APIENTRY crStateFramebufferObjectSwitch(CRContext *from, CRContext *to); 76 76 77 DECLEXPORT(void) STATE_APIENTRY crStateFramebufferObjectDisableHW(CRContext *ctx, GLuint id FBO);78 DECLEXPORT(void) STATE_APIENTRY crStateFramebufferObjectReenableHW(CRContext *fromCtx, CRContext *toCtx, GLuint id FBO);77 DECLEXPORT(void) STATE_APIENTRY crStateFramebufferObjectDisableHW(CRContext *ctx, GLuint idDrawFBO, GLuint idReadFBO); 78 DECLEXPORT(void) STATE_APIENTRY crStateFramebufferObjectReenableHW(CRContext *fromCtx, CRContext *toCtx, GLuint idDrawFBO, GLuint idReadFBO); 79 79 80 80 DECLEXPORT(GLuint) STATE_APIENTRY crStateGetFramebufferHWID(GLuint id); -
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.