]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - gl_rmain.c
attempt to reduce timeouts to fix xonotic-data.pk3dir issue 1780 - doesn't work
[xonotic/darkplaces.git] / gl_rmain.c
index 8bf14a8afd42673e1fa13b42bc2deb6f3dcad96b..6a316432495af90663d7c35e9fc3795caa040d0a 100644 (file)
@@ -1115,6 +1115,27 @@ static void R_GLSL_CompilePermutation(r_glsl_permutation_t *p, unsigned int mode
                geomstrings_list[geomstrings_count++] = "#define GLSL130\n";
                fragstrings_list[fragstrings_count++] = "#define GLSL130\n";
        }
+       // if we can do #version 120, we should (this adds the invariant keyword)
+       else if(vid.support.glshaderversion >= 120)
+       {
+               vertstrings_list[vertstrings_count++] = "#version 120\n";
+               geomstrings_list[geomstrings_count++] = "#version 120\n";
+               fragstrings_list[fragstrings_count++] = "#version 120\n";
+               vertstrings_list[vertstrings_count++] = "#define GLSL120\n";
+               geomstrings_list[geomstrings_count++] = "#define GLSL120\n";
+               fragstrings_list[fragstrings_count++] = "#define GLSL120\n";
+       }
+       // GLES also adds several things from GLSL120
+       switch(vid.renderpath)
+       {
+       case RENDERPATH_GLES2:
+               vertstrings_list[vertstrings_count++] = "#define GLES\n";
+               geomstrings_list[geomstrings_count++] = "#define GLES\n";
+               fragstrings_list[fragstrings_count++] = "#define GLES\n";
+               break;
+       default:
+               break;
+       }
 
        // the first pretext is which type of shader to compile as
        // (later these will all be bound together as a program object)
@@ -6625,6 +6646,7 @@ static void R_Bloom_MakeTexture(void)
        r_fb.bloomindex = 0;
        R_Mesh_SetRenderTargets(r_fb.bloomfbo[r_fb.bloomindex], NULL, r_fb.bloomtexture[r_fb.bloomindex], NULL, NULL, NULL);
        R_SetViewport(&r_fb.bloomviewport);
+       GL_CullFace(GL_NONE);
        GL_DepthTest(false);
        GL_BlendFunc(GL_ONE, GL_ZERO);
        GL_Color(colorscale, colorscale, colorscale, 1);