Shaders: Make sure to always use matching versions.

Really should unify this somehow.
This commit is contained in:
Henrik Rydgård 2013-12-29 12:27:19 +01:00
parent c277fe3019
commit 64717d1b02

View File

@ -176,6 +176,12 @@ void GenerateVertexShader(int prim, u32 vertType, char *buffer, bool useHWTransf
if (gl_extensions.VersionGEThan(3, 3, 0)) {
glslES30 = true;
WRITE(p, "#version 330\n");
} else if (gl_extensions.VersionGEThan(3, 0, 0)) {
WRITE(p, "#version 130\n");
// Remove lowp/mediump in non-mobile non-glsl 3 implementations
WRITE(p, "#define lowp\n");
WRITE(p, "#define mediump\n");
WRITE(p, "#define highp\n");
} else {
WRITE(p, "#version 110\n");
// Remove lowp/mediump in non-mobile non-glsl 3 implementations