Merge pull request #31 from lvonasek/feature_player_rendering_fix

Workaround to make in menu player model rendering working
This commit is contained in:
Simon 2022-03-23 20:21:21 +00:00 committed by GitHub
commit ed7fa0855b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -243,7 +243,13 @@ static void GLSL_GetShaderHeader( GLenum shaderType, const GLchar *extra, char *
// HACK: abuse the GLSL preprocessor to turn GLSL 1.20 shaders into 1.30 ones
#ifdef __ANDROID__
Q_strcat(dest, size, "#version 300 es\n");
Q_strcat(dest, size, "precision highp float;\n");
// HACK: use in main menu medium float precision (to prevent issue with missing models textures)
if (Cvar_Get("r_uiFullScreen", "1", 0)->integer)
Q_strcat(dest, size, "precision mediump float;\n");
else
Q_strcat(dest, size, "precision highp float;\n");
if(shaderType == GL_VERTEX_SHADER)
{
Q_strcat(dest, size, "#define attribute in\n");