OpenGL2: Fix issues running under WebGL

This commit is contained in:
Zack Middleton committed 2024-06-06 19:49:17 -04:00
1 parent 980147721a
commit 551fa6c797
5 files changed
+24 -10

No files matched your search

+6 -1
View File
@@ -283,7 +283,12 @@ static void InitOpenGL( void )
glRefConfig.maxVertexAttribs = temp;
// reserve 160 components for other uniforms
qglGetIntegerv( GL_MAX_VERTEX_UNIFORM_COMPONENTS, &temp );
if ( qglesMajorVersion ) {
qglGetIntegerv( GL_MAX_VERTEX_UNIFORM_VECTORS, &temp );
temp *= 4;
} else {
qglGetIntegerv( GL_MAX_VERTEX_UNIFORM_COMPONENTS, &temp );
}
glRefConfig.glslMaxAnimatedBones = Com_Clamp( 0, IQM_MAX_JOINTS, ( temp - 160 ) / 16 );
if ( glRefConfig.glslMaxAnimatedBones < 12 ) {
glRefConfig.glslMaxAnimatedBones = 0;