PDA

View Full Version : Issue with VBO: program crashes with "Unhandled exception" when call glGenVertexArray



Noisemaker
11-05-2012, 10:04 AM
Hi,
i've a really tedious problem using OpenGL with VBO.
I just begin to code and following a tutorial step by step (on vertex, shader, 3D world, etc...) i finally draw a rotating 3D cube.
On my desktop PC, all works.
On my notebook the program give me this error
Unhandled exception at 0x777615de in ogl_tutorial_1.exe: 0xC0000005: Access violation.
Using debugger i found the problem is when try to call

glGenVertexArrays(1, &BufferIds[0]);

I use GLEW and freeGLUT as addictional libraries.

Searching on google problem seems to refer to VBO hardware support. Is that the problem?
I write here the HW config of my two PC:
Desktop
Intel core i7
ATI HD5770

Notebook
Intel core i7 3610QM
nVidia GeForce GT630M

On both i use Win 7 Pro x64 and Visual Studio 2010 as programming IDE

Can someone help me?? :( :(
(sorry for my english mistakes)

Alfonse Reinheart
11-05-2012, 10:57 AM
Did you actually initialize GLEW successfully?

Noisemaker
11-07-2012, 09:14 AM
Yes, all initializations are ok.
So searching hardly on web finally i found a solution!!
I post it here so if someone have the same problem can solve =)
http://openglbook.com/glgenvertexarrays-access-violationsegfault-with-glew/
or, briefly (from the site above)

To fix this, add the following statement right above your call to glewInit:
glewExperimental = GL_TRUE;