From 34463dcddc5c44797de362a7f54b0aa02ac3f1b8 Mon Sep 17 00:00:00 2001 From: mittorn Date: Sat, 28 Sep 2019 21:13:38 +0700 Subject: [PATCH] ref_gl: fix glConfig.max_texture_units when GL_MAX_TEXTURE_UNITS_ARB query not supported --- ref_gl/gl-wes-v2 | 2 +- ref_gl/gl_opengl.c | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ref_gl/gl-wes-v2 b/ref_gl/gl-wes-v2 index 4529654a..dd0b3fa6 160000 --- a/ref_gl/gl-wes-v2 +++ b/ref_gl/gl-wes-v2 @@ -1 +1 @@ -Subproject commit 4529654a3f0c1cc665d5e25a8b509eaab74b7e61 +Subproject commit dd0b3fa6b98b36d9ebfed2579f0fb1a04606d16f diff --git a/ref_gl/gl_opengl.c b/ref_gl/gl_opengl.c index eed97645..f71bd281 100644 --- a/ref_gl/gl_opengl.c +++ b/ref_gl/gl_opengl.c @@ -541,8 +541,11 @@ void GL_InitExtensionsGLES( void ) GL_SetExtension( extid, true ); // required to be supported by wrapper pglGetIntegerv( GL_MAX_TEXTURE_UNITS_ARB, &glConfig.max_texture_units ); - if( glConfig.max_texture_units == 1 ) + if( glConfig.max_texture_units <= 1 ) + { GL_SetExtension( extid, false ); + glConfig.max_texture_units = 1; + } glConfig.max_texture_coords = glConfig.max_teximage_units = glConfig.max_texture_units; break;