2
0
mirror of https://github.com/FWGS/xash3d-fwgs synced 2024-11-22 09:56:22 +01:00

ref_gl: fix enabling multitexturing on GLES

This commit is contained in:
Dmitry Toroshchin 2023-10-06 01:46:17 +03:00
parent ca218a5331
commit 9c6da09316
3 changed files with 6 additions and 3 deletions

View File

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

View File

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

View File

@ -688,9 +688,12 @@ void GL_InitExtensionsGLES( void )
GL_CheckExtension( "vertex_buffer_object", vbofuncs, "gl_vertex_buffer_object", extid );
break;
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 );
if( glConfig.max_texture_units <= 1 )
pglGetIntegerv( GL_MAX_TEXTURE_IMAGE_UNITS_ARB, &glConfig.max_texture_units );
if( glConfig.max_texture_units <= 1 )
{
GL_SetExtension( extid, false );