Skip to content

Commit

Permalink
Merge pull request #2 from Nairou/master
Browse files Browse the repository at this point in the history
Fix for VC2010 compile error in GLFW template
  • Loading branch information
Thomas Weber committed Sep 9, 2011
2 parents fa65542 + 526a1ae commit 4b675db
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions templates/glfw/flextGL.c.template
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,14 @@ void flextLoadOpenglFunctions();

int flextInit()
{
flextLoadOpenglFunctions();

#if $version.major*10 + $version.minor >= 32 and not $version.core
GLint profile;
#end if
int minor = glfwGetWindowParam(GLFW_OPENGL_VERSION_MINOR);
int major = glfwGetWindowParam(GLFW_OPENGL_VERSION_MAJOR);

flextLoadOpenglFunctions();

if (major < $version.major || (major == $version.major && minor < $version.minor)) {
fprintf(stderr, "Error: OpenGL version $(version.major).$(version.minor) not supported.\n");
fprintf(stderr, " Your version is %d.%d.\n", major, minor);
Expand All @@ -26,8 +29,6 @@ int flextInit()
}

#if $version.major*10 + $version.minor >= 32 and not $version.core
GLint profile;

glGetIntegerv(GL_CONTEXT_PROFILE_MASK, &profile);

if ((profile & GL_CONTEXT_COMPATIBILITY_PROFILE_BIT) == 0) {
Expand Down

0 comments on commit 4b675db

Please sign in to comment.