Following the Superbible, broken on win7/64?

I’m trying to follow the first example in the 2nd Chapter of the 2nd Edition of the OpenGL SuperBible.

My machine is a win7/64 box with an nVidia 275/GTX and I have the 260.99 drivers installed.

I’m using the express edition of VisualStudio 2008 and have followed the example to the letter (I’ve even used the source code from the web site to eliminate any potential accuracy problems).

It compiles, but on running,

There’s a line in the software that says “GLenum err = glewInit();”. The value of err turns out to be ‘1’ … which prints a GL version error.

That’s the first error. The second problem is that the “return 1” (and I also tried exit(1)) still calls some atexit() stuff in glut which ends up dereferencing a null pointer — sloppy.

But… my first worry is: why isn’t glewInit() recognizing a useful version of OpenGL on my box.

I’ll add that the GL Extension finder program finds GL just fine and the machine appears to happily run prepackaged GL (and DirectX, for that matter) software just fine.

I don’t have the book so I can’t see the code and I’m completely new to OpenGL but I have had the same problem as you.
Are you sure that you create the rendering context before calling glewInit()?

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.