mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-01-12 08:08:02 +00:00
ref_gl: fix enabling multitexturing on GLES
This commit is contained in:
parent
6bad07b39d
commit
1505740b73
@ -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
|
||||||
|
@ -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';
|
||||||
|
@ -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 );
|
||||||
|
Loading…
Reference in New Issue
Block a user