third_party/virtualbox/src/VBox/Devices/Graphics/DevVGA-SVGA3d-ogl.cpp
/**
 * Restores texture unpacking parameters.
 *
 * @param   pState              The VMSVGA3D state structure.
 * @param   pContext            The active context.
 * @param   pSurface            The surface.
 * @param   pSave               Where stuff was saved.
 */
Restores texture unpacking parameters.
@param   pState              The VMSVGA3D state structure.
@param   pContext            The active context.
@param   pSurface            The surface.
@param   pSave               Where stuff was saved.
Restores texture unpacking parameters . @param pState The VMSVGA3D state structure . @param pContext The active context . @param pSurface The surface . @param pSave Where stuff was saved .
void vmsvga3dOglRestoreUnpackParams(PVMSVGA3DSTATE pState, PVMSVGA3DCONTEXT pContext, PVMSVGA3DSURFACE pSurface,
                                    PCVMSVGAPACKPARAMS pSave)
{
    RT_NOREF(pState, pSurface);
    if (pSave->iAlignment != 1)
        VMSVGA3D_ASSERT_GL_CALL(glPixelStorei(GL_UNPACK_ALIGNMENT, pSave->iAlignment), pState, pContext);
    if (pSave->cxRow != 0)
        VMSVGA3D_ASSERT_GL_CALL(glPixelStorei(GL_UNPACK_ROW_LENGTH, pSave->cxRow), pState, pContext);
#ifdef VMSVGA3D_PARANOID_TEXTURE_PACKING
    if (pSave->cyImage != 0)
        VMSVGA3D_ASSERT_GL_CALL(glPixelStorei(GL_UNPACK_IMAGE_HEIGHT, pSave->cyImage), pState, pContext);
    if (pSave->fSwapBytes != 0)
        VMSVGA3D_ASSERT_GL_CALL(glPixelStorei(GL_UNPACK_SWAP_BYTES, pSave->fSwapBytes), pState, pContext);
    if (pSave->fLsbFirst != 0)
        VMSVGA3D_ASSERT_GL_CALL(glPixelStorei(GL_UNPACK_LSB_FIRST, pSave->fLsbFirst), pState, pContext);
    if (pSave->cSkipRows != 0)
        VMSVGA3D_ASSERT_GL_CALL(glPixelStorei(GL_UNPACK_SKIP_ROWS, pSave->cSkipRows), pState, pContext);
    if (pSave->cSkipPixels != 0)
        VMSVGA3D_ASSERT_GL_CALL(glPixelStorei(GL_UNPACK_SKIP_PIXELS, pSave->cSkipPixels), pState, pContext);
    if (pSave->cSkipImages != 0)
        VMSVGA3D_ASSERT_GL_CALL(glPixelStorei(GL_UNPACK_SKIP_IMAGES, pSave->cSkipImages), pState, pContext);
#endif
}
void vmsvga3dOglRestoreUnpackParams ( PVMSVGA3DSTATE pState , PVMSVGA3DCONTEXT pContext , PVMSVGA3DSURFACE pSurface , PCVMSVGAPACKPARAMS pSave ) { RT_NOREF ( pState , pSurface ) ; if ( pSave -> iAlignment != 1 ) VMSVGA3D_ASSERT_GL_CALL ( glPixelStorei ( GL_UNPACK_ALIGNMENT , pSave -> iAlignment ) , pState , pContext ) ; if ( pSave -> cxRow != 0 ) VMSVGA3D_ASSERT_GL_CALL ( glPixelStorei ( GL_UNPACK_ROW_LENGTH , pSave -> cxRow ) , pState , pContext ) ; #ifdef VMSVGA3D_PARANOID_TEXTURE_PACKING if ( pSave -> cyImage != 0 ) VMSVGA3D_ASSERT_GL_CALL ( glPixelStorei ( GL_UNPACK_IMAGE_HEIGHT , pSave -> cyImage ) , pState , pContext ) ; if ( pSave -> fSwapBytes != 0 ) VMSVGA3D_ASSERT_GL_CALL ( glPixelStorei ( GL_UNPACK_SWAP_BYTES , pSave -> fSwapBytes ) , pState , pContext ) ; if ( pSave -> fLsbFirst != 0 ) VMSVGA3D_ASSERT_GL_CALL ( glPixelStorei ( GL_UNPACK_LSB_FIRST , pSave -> fLsbFirst ) , pState , pContext ) ; if ( pSave -> cSkipRows != 0 ) VMSVGA3D_ASSERT_GL_CALL ( glPixelStorei ( GL_UNPACK_SKIP_ROWS , pSave -> cSkipRows ) , pState , pContext ) ; if ( pSave -> cSkipPixels != 0 ) VMSVGA3D_ASSERT_GL_CALL ( glPixelStorei ( GL_UNPACK_SKIP_PIXELS , pSave -> cSkipPixels ) , pState , pContext ) ; if ( pSave -> cSkipImages != 0 ) VMSVGA3D_ASSERT_GL_CALL ( glPixelStorei ( GL_UNPACK_SKIP_IMAGES , pSave -> cSkipImages ) , pState , pContext ) ; #endif }
Restores texture unpacking parameters.
Restores texture unpacking parameters .