PDA

View Full Version : GLFW binding failure



Kopelrativ
07-02-2011, 03:43 AM
If I use the following lines:

glfwOpenWindowHint(GLFW_OPENGL_VERSION_MAJOR, 3);
glfwOpenWindowHint(GLFW_OPENGL_VERSION_MINOR, 3);

Then glBindVertexArray() will not be defined (will be a null pointer). But when I remove the above lines, glBindVertexArray() will be defined.

The OpenGL version is reported as follows, independent of using the hint functions or not:

Version: 3.3.0 NVIDIA 270.41.06
GLSL: 3.30 NVIDIA via Cg compiler
OpenGL context version parsed by GLFW: 3.3.0

There is only one difference I can find (other than missing pointers), and that is that the OpenGL profile mask is reported as 0x00000000 when the hint functions are not used, and 0x00000001 (core) when the hint functions are used. 0 is an invalid value, I suppose.

If I try to call glfwOpenWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE) (when the hint functions are removed), then the glfwOpenWindow() will fail.

Alfonse Reinheart
07-02-2011, 02:15 PM
Then glBindVertexArray() will not be defined (will be a null pointer).

Are you fetching this pointer with some kind of extension loader or manually? Or are you expecting GLFW to fill it in for you?

If it's the latter, then it's a bug in GLFW.