VirtualBox

Ignore:
Timestamp:
Mar 12, 2013 5:27:04 PM (12 years ago)
Author:
vboxsync
Message:

crOpenGL: offscreen rendering & VRDP+3D-related fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/GuestHost/OpenGL/util/blitter.cpp

    r44997 r45009  
    9292        const RTRECT * pSrcRect = &paSrcRect[i];
    9393        const RTRECT * pDstRect = &paDstRect[i];
    94         pBlitter->pDispatch->BlitFramebufferEXT(
    95                 pSrcRect->xLeft, pSrcRect->yTop, pSrcRect->xRight, pSrcRect->yBottom,
    96                 pDstRect->xLeft, pDstRect->yTop, pDstRect->xRight, pDstRect->yBottom,
    97                 GL_COLOR_BUFFER_BIT, filter);
     94        if (CRBLT_F_OFFSCREEN & fFlags)
     95        {
     96            pBlitter->pDispatch->BlitFramebufferEXT(
     97                    pSrcRect->xLeft, pSrcRect->yTop, pSrcRect->xRight, pSrcRect->yBottom,
     98                    pDstRect->xLeft, pDstRect->yTop, pDstRect->xRight, pDstRect->yBottom,
     99                    GL_COLOR_BUFFER_BIT, filter);
     100        }
     101        else
     102        {
     103            pBlitter->pDispatch->BlitFramebufferEXT(
     104                    pSrcRect->xLeft, pSrc->height - pSrcRect->yTop, pSrcRect->xRight, pSrc->height - pSrcRect->yBottom,
     105                    pDstRect->xLeft, pDstSize->cy - pDstRect->yTop, pDstRect->xRight, pDstSize->cy - pDstRect->yBottom,
     106                    GL_COLOR_BUFFER_BIT, filter);
     107        }
    98108    }
    99109
     
    488498    crBltCheckSetupViewport(pBlitter, pDstSize, enmDstBuff == GL_DRAW_FRAMEBUFFER);
    489499
    490     pBlitter->pfnBlt(pBlitter, pSrc, paSrcRects, pDstSize, paDstRects, cRects, fFlags);
     500    pBlitter->pfnBlt(pBlitter, pSrc, paSrcRects, pDstSize, paDstRects, cRects, fFlags & CRBLT_F_OFFSCREEN);
    491501}
    492502
     
    497507    pBlitter->pDispatch->BindFramebufferEXT(GL_DRAW_FRAMEBUFFER, 0);
    498508
    499     crBltBlitTexBuf(pBlitter, pSrc, paSrcRects, GL_BACK, &DstSize, paDstRects, cRects, fFlags);
     509    crBltBlitTexBuf(pBlitter, pSrc, paSrcRects, GL_BACK, &DstSize, paDstRects, cRects, fFlags & (~CRBLT_F_OFFSCREEN));
    500510}
    501511
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