- test if GLSL version 1.4 can handle uniform buffers on old Intel hardware without making problems...

This commit is contained in:
Christoph Oelckers 2014-10-22 16:54:26 +02:00
parent a6f64500bf
commit 89ce0b8cb7

View file

@ -93,10 +93,17 @@ bool FShader::Load(const char * name, const char * vert_prog_lump, const char *
FString vp_comb; FString vp_comb;
if (lightbuffertype == GL_UNIFORM_BUFFER) if (lightbuffertype == GL_UNIFORM_BUFFER)
{
if (gl.glslversion < 1.4f || gl.version < 3.1f)
{ {
vp_comb.Format("#version 130\n#extension GL_ARB_uniform_buffer_object : require\n#define NUM_UBO_LIGHTS %d\n", lightbuffersize); vp_comb.Format("#version 130\n#extension GL_ARB_uniform_buffer_object : require\n#define NUM_UBO_LIGHTS %d\n", lightbuffersize);
} }
else else
{
vp_comb.Format("#version 140\n#define NUM_UBO_LIGHTS %d\n", lightbuffersize);
}
}
else
{ {
vp_comb = "#version 400 core\n#extension GL_ARB_shader_storage_buffer_object : require\n#define SHADER_STORAGE_LIGHTS\n"; vp_comb = "#version 400 core\n#extension GL_ARB_shader_storage_buffer_object : require\n#define SHADER_STORAGE_LIGHTS\n";
} }