Skip to content

Commit

Permalink
Test for the GL extension, not whether the entry point is NULL.
Browse files Browse the repository at this point in the history
(glXGetProcAddress() can legally return a non-NULL pointer...you have to make
 sure it is safe to call yourself by checking the GL_EXTENSIONS string!)
  • Loading branch information
icculus committed May 24, 2011
1 parent f878408 commit 0feb63d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mojoshader_opengl.c
Expand Up @@ -689,7 +689,7 @@ static void impl_ARB1_PushUniforms(void)
else if (type == MOJOSHADER_UNIFORM_INT)
{
int i;
if (ctx->glProgramLocalParameterI4ivNV != NULL)
if (ctx->have_GL_NV_gpu_program4)
{
// GL_NV_gpu_program4 has integer uniform loading support.
for (i = 0; i < size; i++, srci += 4, loc++)
Expand All @@ -710,7 +710,7 @@ static void impl_ARB1_PushUniforms(void)
else if (type == MOJOSHADER_UNIFORM_BOOL)
{
int i;
if (ctx->glProgramLocalParameterI4ivNV != NULL)
if (ctx->have_GL_NV_gpu_program4)
{
// GL_NV_gpu_program4 has integer uniform loading support.
for (i = 0; i < size; i++, srcb++, loc++)
Expand Down

0 comments on commit 0feb63d

Please sign in to comment.