Changeset 45009 in vbox for trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_muralfbo.c
- Timestamp:
- Mar 12, 2013 5:27:04 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_muralfbo.c
r44951 r45009 265 265 } 266 266 267 if ( !crStateGetCurrent()->framebufferobject.drawFB)268 { 269 cr_server.head_spu->dispatch_table.BindFramebufferEXT(GL_DRAW_FRAMEBUFFER, mural->aidFBOs[mural->iCurDrawBuffer]);270 }271 if (!crStateGetCurrent()->framebufferobject.readFB)272 {273 cr_server.head_spu->dispatch_table.BindFramebufferEXT(GL_READ_FRAMEBUFFER, mural->aidFBOs[mural->iCurReadBuffer]);274 }275 276 if (cr_server.curClient && cr_server.curClient->currentMural == mural)277 { 267 if (cr_server.currentMural == mural) 268 { 269 if (!crStateGetCurrent()->framebufferobject.drawFB) 270 { 271 cr_server.head_spu->dispatch_table.BindFramebufferEXT(GL_DRAW_FRAMEBUFFER, mural->aidFBOs[mural->iCurDrawBuffer]); 272 } 273 if (!crStateGetCurrent()->framebufferobject.readFB) 274 { 275 cr_server.head_spu->dispatch_table.BindFramebufferEXT(GL_READ_FRAMEBUFFER, mural->aidFBOs[mural->iCurReadBuffer]); 276 } 277 278 278 crStateGetCurrent()->buffer.width = 0; 279 279 crStateGetCurrent()->buffer.height = 0; … … 286 286 /* tell renderspu we do not want compositor presentation anymore 287 287 * renderspu will ensure its redraw thread is done with using the compositor, etc. */ 288 cr _server.head_spu->dispatch_table.VBoxPresentComposition(mural->spuWindow, NULL, NULL);288 crServerVBoxCompositionDisable(mural); 289 289 } 290 290 … … 292 292 cr_server.head_spu->dispatch_table.WindowShow(mural->spuWindow, mural->bVisible); 293 293 294 if ( mural->fUseFBO && crServerSupportRedirMuralFBO())294 if (cr_server.currentMural == mural) 295 295 { 296 296 if (!crStateGetCurrent()->framebufferobject.drawFB) … … 302 302 cr_server.head_spu->dispatch_table.BindFramebufferEXT(GL_READ_FRAMEBUFFER, 0); 303 303 } 304 } 305 306 if (cr_server.curClient && cr_server.curClient->currentMural == mural) 307 { 304 308 305 crStateGetCurrent()->buffer.width = mural->width; 309 306 crStateGetCurrent()->buffer.height = mural->height; … … 512 509 } 513 510 511 void crServerVBoxCompositionPresent(CRMuralInfo *mural) 512 { 513 CRMuralInfo *currentMural = cr_server.currentMural; 514 CRContextInfo *curCtxInfo = cr_server.currentCtxInfo; 515 GLuint idDrawFBO, idReadFBO; 516 CRContext *curCtx = curCtxInfo->pContext; 517 518 CRASSERT(curCtx == crStateGetCurrent()); 519 520 if (!mural->bVisible) 521 { 522 return; 523 } 524 525 if (!mural->width || !mural->height) 526 { 527 return; 528 } 529 530 if (!CrVrScrCompositorEntryIsInList(&mural->CEntry)) 531 return; 532 533 if (currentMural) 534 { 535 idDrawFBO = currentMural->aidFBOs[currentMural->iCurDrawBuffer]; 536 idReadFBO = currentMural->aidFBOs[currentMural->iCurReadBuffer]; 537 } 538 else 539 { 540 idDrawFBO = 0; 541 idReadFBO = 0; 542 } 543 544 crStateSwitchPrepare(NULL, curCtx, idDrawFBO, idReadFBO); 545 546 cr_server.head_spu->dispatch_table.VBoxPresentComposition(mural->spuWindow, &mural->Compositor, &mural->CEntry); 547 548 crStateSwitchPostprocess(curCtx, NULL, idDrawFBO, idReadFBO); 549 550 mural->fCompositorPresented = GL_TRUE; 551 } 552 553 void crServerVBoxCompositionReenable(CRMuralInfo *mural) 554 { 555 if (!mural->fCompositorPresented) 556 return; 557 558 crServerVBoxCompositionPresent(mural); 559 } 560 561 void crServerVBoxCompositionDisable(CRMuralInfo *mural) 562 { 563 cr_server.head_spu->dispatch_table.VBoxPresentComposition(mural->spuWindow, NULL, NULL); 564 } 565 514 566 void crServerPresentFBO(CRMuralInfo *mural) 515 567 { … … 539 591 if (mural->fUseFBO == CR_SERVER_REDIR_FBO_BLT) 540 592 { 541 GLuint idDrawFBO, idReadFBO; 542 543 idDrawFBO = mural->aidFBOs[mural->iCurDrawBuffer]; 544 idReadFBO = mural->aidFBOs[mural->iCurReadBuffer]; 545 546 crStateSwitchPrepare(NULL, ctx, idDrawFBO, idReadFBO); 547 548 cr_server.head_spu->dispatch_table.VBoxPresentComposition(mural->spuWindow, &mural->Compositor, &mural->CEntry); 549 550 crStateSwitchPostprocess(ctx, NULL, idDrawFBO, idReadFBO); 551 593 crServerVBoxCompositionPresent(mural); 552 594 return; 553 595 }
Note:
See TracChangeset
for help on using the changeset viewer.