Browse Source

ref_gl: fix enabling multitexturing on GLES

pull/2/head
mittorn 1 year ago committed by Alibek Omarov
parent
commit
1505740b73
  1. 2
      ref/gl/gl2_shim/fragment.glsl.inc
  2. 2
      ref/gl/gl2_shim/gl2_shim.c
  3. 5
      ref/gl/gl_opengl.c

2
ref/gl/gl2_shim/fragment.glsl.inc

@ -9,7 +9,7 @@ R"( @@ -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

2
ref/gl/gl2_shim/gl2_shim.c

@ -154,7 +154,7 @@ static GLuint GL2_GenerateShader( gl2wrap_prog_t *prog, GLenum type ) @@ -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';

5
ref/gl/gl_opengl.c

@ -686,9 +686,12 @@ void GL_InitExtensionsGLES( void ) @@ -686,9 +686,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 );

Loading…
Cancel
Save