Changeset 44747 in vbox for trunk/src/VBox/HostServices/SharedOpenGL
- Timestamp:
- Feb 19, 2013 11:37:13 AM (12 years ago)
- Location:
- trunk/src/VBox/HostServices/SharedOpenGL/crserverlib
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_main.c
r44746 r44747 1056 1056 CRASSERT(Tex.hwid); 1057 1057 1058 pvData = CrHlpGetTexImage(pContext, &Tex, idPBO );1058 pvData = CrHlpGetTexImage(pContext, &Tex, idPBO, GL_RGBA); 1059 1059 if (!pvData) 1060 1060 { … … 1073 1073 CRASSERT(Tex.hwid); 1074 1074 1075 pvData = CrHlpGetTexImage(pContext, &Tex, idPBO );1075 pvData = CrHlpGetTexImage(pContext, &Tex, idPBO, GL_RGBA); 1076 1076 if (!pvData) 1077 1077 { … … 1651 1651 Tex.hwid = pMural->aidColorTexs[CR_SERVER_FBO_FB_IDX(pMural)]; 1652 1652 CRASSERT(Tex.hwid); 1653 CrHlpPutTexImage(pContext, &Tex, pBuf->pFrontImg);1653 CrHlpPutTexImage(pContext, &Tex, GL_RGBA, pBuf->pFrontImg); 1654 1654 } 1655 1655 … … 1658 1658 Tex.hwid = pMural->aidColorTexs[CR_SERVER_FBO_BB_IDX(pMural)]; 1659 1659 CRASSERT(Tex.hwid); 1660 CrHlpPutTexImage(pContext, &Tex, pBuf->pBackImg);1660 CrHlpPutTexImage(pContext, &Tex, GL_RGBA, pBuf->pBackImg); 1661 1661 } 1662 1662 -
trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_muralfbo.c
r44740 r44747 570 570 } 571 571 572 pixels = CrHlpGetTexImage(ctx, &Tex, idPBO );572 pixels = CrHlpGetTexImage(ctx, &Tex, idPBO, GL_BGRA); 573 573 if (!pixels) 574 574 { -
trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_presenter.cpp
r44746 r44747 286 286 } 287 287 288 void CrHlpPutTexImage(CRContext *pCurCtx, PVBOXVR_TEXTURE pTexture, void *pvData)288 void CrHlpPutTexImage(CRContext *pCurCtx, PVBOXVR_TEXTURE pTexture, GLenum enmFormat, void *pvData) 289 289 { 290 290 CRASSERT(pTexture->hwid); … … 297 297 298 298 /*read the texture, note pixels are NULL for PBO case as it's offset in the buffer*/ 299 cr_server.head_spu->dispatch_table.TexSubImage2D(GL_TEXTURE_2D, 0 /* level*/, 0 /*xoffset*/, 0 /*yoffset*/, pTexture->width, pTexture->height, GL_BGRA, GL_UNSIGNED_BYTE, pvData);299 cr_server.head_spu->dispatch_table.TexSubImage2D(GL_TEXTURE_2D, 0 /* level*/, 0 /*xoffset*/, 0 /*yoffset*/, pTexture->width, pTexture->height, enmFormat, GL_UNSIGNED_BYTE, pvData); 300 300 301 301 /*restore gl state*/ … … 318 318 } 319 319 320 void* CrHlpGetTexImage(CRContext *pCurCtx, PVBOXVR_TEXTURE pTexture, GLuint idPBO )320 void* CrHlpGetTexImage(CRContext *pCurCtx, PVBOXVR_TEXTURE pTexture, GLuint idPBO, GLenum enmFormat) 321 321 { 322 322 void *pvData = NULL; … … 343 343 344 344 /*read the texture, note pixels are NULL for PBO case as it's offset in the buffer*/ 345 cr_server.head_spu->dispatch_table.GetTexImage(GL_TEXTURE_2D, 0, GL_BGRA, GL_UNSIGNED_BYTE, pvData);345 cr_server.head_spu->dispatch_table.GetTexImage(GL_TEXTURE_2D, 0, enmFormat, GL_UNSIGNED_BYTE, pvData); 346 346 347 347 /*restore gl state*/
Note:
See TracChangeset
for help on using the changeset viewer.