VirtualBox

Ignore:
Timestamp:
Feb 19, 2013 11:37:13 AM (12 years ago)
Author:
vboxsync
Message:

crOpenGL: unify saved fb/bb image data format

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  
    10561056        CRASSERT(Tex.hwid);
    10571057
    1058         pvData = CrHlpGetTexImage(pContext, &Tex, idPBO);
     1058        pvData = CrHlpGetTexImage(pContext, &Tex, idPBO, GL_RGBA);
    10591059        if (!pvData)
    10601060        {
     
    10731073        CRASSERT(Tex.hwid);
    10741074
    1075         pvData = CrHlpGetTexImage(pContext, &Tex, idPBO);
     1075        pvData = CrHlpGetTexImage(pContext, &Tex, idPBO, GL_RGBA);
    10761076        if (!pvData)
    10771077        {
     
    16511651                    Tex.hwid = pMural->aidColorTexs[CR_SERVER_FBO_FB_IDX(pMural)];
    16521652                    CRASSERT(Tex.hwid);
    1653                     CrHlpPutTexImage(pContext, &Tex, pBuf->pFrontImg);
     1653                    CrHlpPutTexImage(pContext, &Tex, GL_RGBA, pBuf->pFrontImg);
    16541654                }
    16551655
     
    16581658                    Tex.hwid = pMural->aidColorTexs[CR_SERVER_FBO_BB_IDX(pMural)];
    16591659                    CRASSERT(Tex.hwid);
    1660                     CrHlpPutTexImage(pContext, &Tex, pBuf->pBackImg);
     1660                    CrHlpPutTexImage(pContext, &Tex, GL_RGBA, pBuf->pBackImg);
    16611661                }
    16621662
  • trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_muralfbo.c

    r44740 r44747  
    570570    }
    571571
    572     pixels = CrHlpGetTexImage(ctx, &Tex, idPBO);
     572    pixels = CrHlpGetTexImage(ctx, &Tex, idPBO, GL_BGRA);
    573573    if (!pixels)
    574574    {
  • trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_presenter.cpp

    r44746 r44747  
    286286}
    287287
    288 void CrHlpPutTexImage(CRContext *pCurCtx, PVBOXVR_TEXTURE pTexture, void *pvData)
     288void CrHlpPutTexImage(CRContext *pCurCtx, PVBOXVR_TEXTURE pTexture, GLenum enmFormat, void *pvData)
    289289{
    290290    CRASSERT(pTexture->hwid);
     
    297297
    298298    /*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);
    300300
    301301    /*restore gl state*/
     
    318318}
    319319
    320 void* CrHlpGetTexImage(CRContext *pCurCtx, PVBOXVR_TEXTURE pTexture, GLuint idPBO)
     320void* CrHlpGetTexImage(CRContext *pCurCtx, PVBOXVR_TEXTURE pTexture, GLuint idPBO, GLenum enmFormat)
    321321{
    322322    void *pvData = NULL;
     
    343343
    344344    /*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);
    346346
    347347    /*restore gl state*/
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette