ref_gl: fix enabling multitexturing on GLES

This commit is contained in:
mittorn 2023-10-06 01:46:17 +03:00 committed by Alibek Omarov
parent 6bad07b39d
commit 1505740b73
3 changed files with 6 additions and 3 deletions

View File

@ -9,7 +9,7 @@ R"(
#define in varying #define in varying
#define texture texture2D #define texture texture2D
#endif #endif
#if version >= 130 #if VER >= 130
precision mediump float; precision mediump float;
#endif #endif
#if ATTR_TEXCOORD0 #if ATTR_TEXCOORD0

View File

@ -154,7 +154,7 @@ static GLuint GL2_GenerateShader( gl2wrap_prog_t *prog, GLenum type )
int i; int i;
GLint status, len; GLint status, len;
GLuint id, loc; GLuint id, loc;
int version = 130; int version = 300;
shader = shader_buf; shader = shader_buf;
//shader[0] = '\n'; //shader[0] = '\n';

View File

@ -686,9 +686,12 @@ void GL_InitExtensionsGLES( void )
GL_CheckExtension( "vertex_buffer_object", vbofuncs, "gl_vertex_buffer_object", extid ); GL_CheckExtension( "vertex_buffer_object", vbofuncs, "gl_vertex_buffer_object", extid );
break; break;
case GL_ARB_MULTITEXTURE: case GL_ARB_MULTITEXTURE:
GL_SetExtension( extid, true ); // required to be supported by wrapper GL_CheckExtension( "multitexture", multitexturefuncs, "gl_arb_multitexture", GL_ARB_MULTITEXTURE );
//GL_SetExtension( extid, true ); // required to be supported by wrapper
pglGetIntegerv( GL_MAX_TEXTURE_UNITS_ARB, &glConfig.max_texture_units ); pglGetIntegerv( GL_MAX_TEXTURE_UNITS_ARB, &glConfig.max_texture_units );
if( glConfig.max_texture_units <= 1 )
pglGetIntegerv( GL_MAX_TEXTURE_IMAGE_UNITS_ARB, &glConfig.max_texture_units );
if( glConfig.max_texture_units <= 1 ) if( glConfig.max_texture_units <= 1 )
{ {
GL_SetExtension( extid, false ); GL_SetExtension( extid, false );