Question

How do I create a core profile using GLFW and OpenGL? I'm currently running Mesa 10.0.2 which should support OpenGL 3.3 in a core profile and 3.0 in a non-core profile.

Currently this is what I'm trying to do.

glfwOpenWindowHint(GLFW_FSAA_SAMPLES, 4);
glfwOpenWindowHint(GLFW_OPENGL_VERSION_MAJOR, 3);
glfwOpenWindowHint(GLFW_OPENGL_VERSION_MINOR, 3);
glfwOpenWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);

// Create context
if( !glfwOpenWindow( 1024, 768, 0,0,0,0, 32,0, GLFW_WINDOW ) )
{
    fprintf( stderr, "Failed to create context\n" );
    glfwTerminate();
    return -1;
}
Was it helpful?

Solution

I found this to be largely a GLFW version issue as genpfault and Brett Hale pointed out. Once I ported the offending code to GLFW 3 the issue disappeared. I also updated to a newer version of the GLM library. For those who are playing with opengl-tutorial.org, I suggest taking it as an exercise to rewrite the code using updated libraries as the ones supplied are very old at this point.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top