PDA

View Full Version : glBindBuffer() execution problem



sam_thedancer
10-05-2012, 08:55 AM
Greetings:
I am running MS VC++ 2010 in W7 trying to understand OpenGL buffers. A program copied from the red book runs fine up to and including the first line below.
...
glGenBuffers(NUM_BUFFERS, buffers);
glBindBuffer(GL_ARRAY_BUFFER, buffers[VERTICES]);
...
// NUM_BUFFERS = 2, VERTICES = 0

But once the second line is uncommented, it does compile but blows up executing with
"Unhandled exception at 0x003bff04 in Buffers.exe: 0xC0000005: Access violation reading location 0x015efdf8."

I have included and initialized GLUT and GLEW. So what could be the problem? glBindBuffer() wants to access the GPU but something has to be set first? Do I need to use freeGLUT rather than the (outdated?) GLUT?

Any suggestions would be welcome.
Thanks,
Sam

V-man
10-06-2012, 04:00 AM
You need GL 1.5 at minimum to use VBO. Check your GL version.