third_party/virtualbox/src/VBox/Devices/Graphics/DevVGA-SVGA3d-win.cpp
/* Convert VMWare primitive type to its D3D equivalent. */
Convert VMWare primitive type to its D3D equivalent.
Convert VMWare primitive type to its D3D equivalent .
static int vmsvga3dPrimitiveType2D3D(SVGA3dPrimitiveType PrimitiveType, D3DPRIMITIVETYPE *pPrimitiveTypeD3D)
{
    switch (PrimitiveType)
    {
    case SVGA3D_PRIMITIVE_TRIANGLELIST:
        *pPrimitiveTypeD3D = D3DPT_TRIANGLELIST;
        break;
    case SVGA3D_PRIMITIVE_POINTLIST:
        *pPrimitiveTypeD3D = D3DPT_POINTLIST;
        break;
    case SVGA3D_PRIMITIVE_LINELIST:
        *pPrimitiveTypeD3D = D3DPT_LINELIST;
        break;
    case SVGA3D_PRIMITIVE_LINESTRIP:
        *pPrimitiveTypeD3D = D3DPT_LINESTRIP;
        break;
    case SVGA3D_PRIMITIVE_TRIANGLESTRIP:
        *pPrimitiveTypeD3D = D3DPT_TRIANGLESTRIP;
        break;
    case SVGA3D_PRIMITIVE_TRIANGLEFAN:
        *pPrimitiveTypeD3D = D3DPT_TRIANGLEFAN;
        break;
    default:
        return VERR_INVALID_PARAMETER;
    }
    return VINF_SUCCESS;
}
static int vmsvga3dPrimitiveType2D3D ( SVGA3dPrimitiveType PrimitiveType , D3DPRIMITIVETYPE * pPrimitiveTypeD3D ) { switch ( PrimitiveType ) { case SVGA3D_PRIMITIVE_TRIANGLELIST : * pPrimitiveTypeD3D = D3DPT_TRIANGLELIST ; break ; case SVGA3D_PRIMITIVE_POINTLIST : * pPrimitiveTypeD3D = D3DPT_POINTLIST ; break ; case SVGA3D_PRIMITIVE_LINELIST : * pPrimitiveTypeD3D = D3DPT_LINELIST ; break ; case SVGA3D_PRIMITIVE_LINESTRIP : * pPrimitiveTypeD3D = D3DPT_LINESTRIP ; break ; case SVGA3D_PRIMITIVE_TRIANGLESTRIP : * pPrimitiveTypeD3D = D3DPT_TRIANGLESTRIP ; break ; case SVGA3D_PRIMITIVE_TRIANGLEFAN : * pPrimitiveTypeD3D = D3DPT_TRIANGLEFAN ; break ; default : return VERR_INVALID_PARAMETER ; } return VINF_SUCCESS ; }
Convert VMWare primitive type to its D3D equivalent.
Convert VMWare primitive type to its D3D equivalent .