GL: Identifiers starting with GL_ are reserved for the implementation

Some compilers are less strict about this than others, unfortunately.
The Gallium one complains with

preprocessor error: Macro names starting with "GL_" are reserved.
Günther Brammer 2012-05-30 23:34:08 +02:00
parent a029737811
commit 20577f8575
2 changed files with 3 additions and 3 deletions

View File

@ -11,7 +11,7 @@ uniform vec2 resolution;
// Use sampler if the GPU doesn't support enough uniforms to
// get the matMap as an array
#if GL_MAX_FRAGMENT_UNIFORM_COMPONENTS < 259
#if MAX_FRAGMENT_UNIFORM_COMPONENTS < 259
#define BROKEN_ARRAYS_WORKAROUND
#endif

View File

@ -550,9 +550,9 @@ GLhandleARB C4LandscapeRenderGL::CreateShader(GLenum iShaderType, const char *sz
// Get number of available uniforms from driver
GLint max_uniforms = 0;
glGetIntegerv(GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB, &max_uniforms);
Version.AppendFormat("#define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS %d\n", max_uniforms);
Version.AppendFormat("#define MAX_FRAGMENT_UNIFORM_COMPONENTS %d\n", max_uniforms);
glGetIntegerv(GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB, &max_uniforms);
Version.AppendFormat("#define GL_MAX_VERTEX_UNIFORM_COMPONENTS %d\n", max_uniforms);
Version.AppendFormat("#define MAX_VERTEX_UNIFORM_COMPONENTS %d\n", max_uniforms);
// Build code
const char *szCodes[C4LR_ShaderWorkaroundCount + 2];