Changeset 36843 in vbox for trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_muralfbo.c
- Timestamp:
- Apr 26, 2011 8:33:19 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_muralfbo.c
r36052 r36843 46 46 } 47 47 48 /* Called when a new CRMuralInfo is created 49 * or when OutputRedirect status is changed. 50 */ 51 void crServerSetupOutputRedirect(CRMuralInfo *mural) 52 { 53 /* Unset the previous redirect. */ 54 if (mural->pvOutputRedirectInstance) 55 { 56 cr_server.outputRedirect.CROREnd(mural->pvOutputRedirectInstance); 57 mural->pvOutputRedirectInstance = NULL; 58 } 59 60 /* Setup a new redirect. */ 61 if (cr_server.bUseOutputRedirect) 62 { 63 /* Query supported formats. */ 64 uint32_t cbFormats = 4096; 65 char *pachFormats = (char *)crAlloc(cbFormats); 66 67 if (pachFormats) 68 { 69 int rc = cr_server.outputRedirect.CRORContextProperty(cr_server.outputRedirect.pvContext, 70 0 /* H3DOR_PROP_FORMATS */, // @todo from a header 71 pachFormats, cbFormats, &cbFormats); 72 if (RT_SUCCESS(rc)) 73 { 74 if (strstr(pachFormats, "H3DOR_FMT_RGBA_TOPDOWN")) 75 { 76 cr_server.outputRedirect.CRORBegin(cr_server.outputRedirect.pvContext, 77 &mural->pvOutputRedirectInstance, 78 "H3DOR_FMT_RGBA_TOPDOWN"); // @todo from a header 79 } 80 } 81 82 crFree(pachFormats); 83 } 84 85 /* If this is not NULL then there was a supported format. */ 86 if (mural->pvOutputRedirectInstance) 87 { 88 cr_server.outputRedirect.CRORGeometry(mural->pvOutputRedirectInstance, 89 mural->hX, mural->hY, 90 mural->width, mural->height); 91 // @todo the code assumes that RTRECT == four of GLInts 92 cr_server.outputRedirect.CRORVisibleRegion(mural->pvOutputRedirectInstance, 93 mural->cVisibleRects, (RTRECT *)mural->pVisibleRects); 94 } 95 } 96 } 97 48 98 void crServerCheckMuralGeometry(CRMuralInfo *mural) 49 99 { … … 136 186 cr_server.head_spu->dispatch_table.WindowPosition(mural->spuWindow, mural->hX, mural->hY); 137 187 } 188 } 189 190 if (mural->pvOutputRedirectInstance) 191 { 192 cr_server.outputRedirect.CRORGeometry(mural->pvOutputRedirectInstance, 193 mural->hX, mural->hY, 194 mural->width, mural->height); 138 195 } 139 196 } … … 455 512 } 456 513 514 if (mural->pvOutputRedirectInstance) 515 { 516 /* @todo find out why presentfbo is not called but crorframe is called. */ 517 cr_server.outputRedirect.CRORFrame(mural->pvOutputRedirectInstance, 518 pixels, 519 4 * mural->fboWidth * mural->fboHeight); 520 } 521 457 522 if (bUsePBO) 458 523 {
Note:
See TracChangeset
for help on using the changeset viewer.