mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-01-10 23:27:53 +00:00
ref_gl: bring back glDrawRangeElements support
This commit is contained in:
parent
4c6e64c89b
commit
3c3d5d472e
@ -615,6 +615,7 @@ enum
|
|||||||
GL_DEPTH_TEXTURE,
|
GL_DEPTH_TEXTURE,
|
||||||
GL_DEBUG_OUTPUT,
|
GL_DEBUG_OUTPUT,
|
||||||
GL_ARB_VERTEX_BUFFER_OBJECT_EXT,
|
GL_ARB_VERTEX_BUFFER_OBJECT_EXT,
|
||||||
|
GL_DRAW_RANGEELEMENTS_EXT,
|
||||||
GL_EXTCOUNT, // must be last
|
GL_EXTCOUNT, // must be last
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -246,6 +246,18 @@ static dllfunc_t vbofuncs[] =
|
|||||||
{ NULL, NULL }
|
{ NULL, NULL }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static dllfunc_t drawrangeelementsfuncs[] =
|
||||||
|
{
|
||||||
|
{ GL_CALL( glDrawRangeElements ) },
|
||||||
|
{ NULL, NULL }
|
||||||
|
};
|
||||||
|
|
||||||
|
static dllfunc_t drawrangeelementsextfuncs[] =
|
||||||
|
{
|
||||||
|
{ GL_CALL( glDrawRangeElementsEXT ) },
|
||||||
|
{ NULL, NULL }
|
||||||
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
========================
|
========================
|
||||||
DebugCallback
|
DebugCallback
|
||||||
@ -581,6 +593,7 @@ void GL_InitExtensionsGLES( void )
|
|||||||
// case GL_ARB_SEAMLESS_CUBEMAP: NOPE
|
// case GL_ARB_SEAMLESS_CUBEMAP: NOPE
|
||||||
// case GL_EXT_GPU_SHADER4: NOPE
|
// case GL_EXT_GPU_SHADER4: NOPE
|
||||||
// case GL_DEPTH_TEXTURE: NOPE
|
// case GL_DEPTH_TEXTURE: NOPE
|
||||||
|
// case GL_DRAWRANGEELEMENTS_EXT: NOPE
|
||||||
default:
|
default:
|
||||||
GL_SetExtension( extid, false );
|
GL_SetExtension( extid, false );
|
||||||
}
|
}
|
||||||
@ -692,6 +705,15 @@ void GL_InitExtensionsBigGL( void )
|
|||||||
// rectangle textures support
|
// rectangle textures support
|
||||||
GL_CheckExtension( "GL_ARB_texture_rectangle", NULL, "gl_texture_rectangle", GL_TEXTURE_2D_RECT_EXT );
|
GL_CheckExtension( "GL_ARB_texture_rectangle", NULL, "gl_texture_rectangle", GL_TEXTURE_2D_RECT_EXT );
|
||||||
|
|
||||||
|
if( !GL_CheckExtension( "glDrawRangeElements", drawrangeelementsfuncs, "gl_drawrangeelements", GL_DRAW_RANGEELEMENTS_EXT ) )
|
||||||
|
{
|
||||||
|
if( GL_CheckExtension( "glDrawRangeElementsEXT", drawrangeelementsextfuncs,
|
||||||
|
"gl_drawrangelements", GL_DRAW_RANGEELEMENTS_EXT ) )
|
||||||
|
{
|
||||||
|
pglDrawRangeElements = pglDrawRangeElementsEXT;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// this won't work without extended context
|
// this won't work without extended context
|
||||||
if( glw_state.extended )
|
if( glw_state.extended )
|
||||||
GL_CheckExtension( "GL_ARB_debug_output", debugoutputfuncs, "gl_debug_output", GL_DEBUG_OUTPUT );
|
GL_CheckExtension( "GL_ARB_debug_output", debugoutputfuncs, "gl_debug_output", GL_DEBUG_OUTPUT );
|
||||||
|
Loading…
Reference in New Issue
Block a user