From c765261db683387a89bac3198ca0845fa5be8fb2 Mon Sep 17 00:00:00 2001 From: mittorn Date: Fri, 6 Oct 2023 01:14:48 +0300 Subject: [PATCH] ref_gl: fix late studio cvars registration, enable DrawRangeElements in GLES contexts --- ref/gl/gl_opengl.c | 3 +++ ref/gl/gl_studio.c | 2 -- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ref/gl/gl_opengl.c b/ref/gl/gl_opengl.c index 57c63691..95f0af82 100644 --- a/ref/gl/gl_opengl.c +++ b/ref/gl/gl_opengl.c @@ -720,6 +720,9 @@ void GL_InitExtensionsGLES( void ) case GL_ARB_VERTEX_ARRAY_OBJECT_EXT: GL_CheckExtension( "vertex_array_object", vaofuncs, "gl_vertex_array_object", extid ); break; + case GL_DRAW_RANGEELEMENTS_EXT: + GL_CheckExtension( "draw_range_elements", drawrangeelementsfuncs, "gl_drawrangeelements", extid ); + break; #endif case GL_DEBUG_OUTPUT: if( glw_state.extended ) diff --git a/ref/gl/gl_studio.c b/ref/gl/gl_studio.c index 2fe5aafd..ebeece6f 100644 --- a/ref/gl/gl_studio.c +++ b/ref/gl/gl_studio.c @@ -146,8 +146,6 @@ R_StudioInit */ void R_StudioInit( void ) { - gEngfuncs.Cvar_RegisterVariable( &r_studio_sort_textures ); - gEngfuncs.Cvar_RegisterVariable( &r_studio_drawelements ); #if XASH_PSVITA // don't do the same array-building work twice since that's what our FFP shim does anyway