Skip to content

Commit

Permalink
loader: fix issue #6
Browse files Browse the repository at this point in the history
  • Loading branch information
Dav1dde committed Apr 5, 2014
1 parent 875d814 commit d305614
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions glad/loader/gl/c.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,14 @@
'''

_OPENGL_HAS_EXT = '''
#if defined(GL_ES_VERSION_3_0) || defined(GL_VERSION_3_0)
#define _GLAD_IS_SOME_NEW_VERSION 1
#endif
static int has_ext(const char *ext) {
#ifdef _GLAD_IS_SOME_NEW_VERSION
if(GLVersion.major < 3) {
#endif
const char *extensions;
const char *loc;
const char *terminator;
Expand All @@ -38,6 +44,7 @@
}
extensions = terminator;
}
#ifdef _GLAD_IS_SOME_NEW_VERSION
} else {
int num;
glGetIntegerv(GL_NUM_EXTENSIONS, &num);
Expand All @@ -50,6 +57,7 @@
}
}
}
#endif
return 0;
}
Expand Down

0 comments on commit d305614

Please sign in to comment.