Aug 6, 2013 at 3:44pm UTC
Hello,
I am currently doing a bit of opengl c++ programming and am currently following this tutorial:
http://www.antongerdelan.net/opengl/mesh.html
However I am getting this access exception:
Unhandled exception at 0x777ABDA1 : 0xC0000005: Access violation executing location 0x00000000.
at this part of the code:
1 2 3
unsigned int vbo = 0;
glGenBuffers(1, &vbo);
Any Suggestions? :(
Many Thanks
DoctorZeus
Last edited on Aug 6, 2013 at 3:45pm UTC
Aug 6, 2013 at 3:55pm UTC
If you are using the glload library... you need to load the functions first. What it looks like is happening is your 'glGenBuffers' is a null function pointer so the program explodes when you try to call it.
call glload::LoadFunctions();
once at program startup.
Aug 6, 2013 at 4:09pm UTC
Thanks for the Reply :)
I haven't got the unofficial opengl software dev kit, these functions depend on glew instead..
Should I download the kit then?
Thanks
DoctorZeus
Aug 6, 2013 at 4:21pm UTC
I'm not familiar with using glew directly. =x
But yeah I'd recommend getting the unofficial sdk.
Aug 6, 2013 at 4:29pm UTC
It says during the initial "Hello Triangle" tutorial that all you need is glfw and glew:
http://www.antongerdelan.net/opengl/hellotriangle.html
:/
If I add the opensdk as well I am gonna have a hello of a lot of extra libraries that I may not need..?
Any Suggestions without the Unofficial GLSDK??
Also I have added a function when the application starts that checks that both glew and glfw are initialized:
1 2
if (!glfwInit() || !glewInit())
return ;
Thanks
DoctorZeus
Last edited on Aug 6, 2013 at 4:33pm UTC
Aug 8, 2013 at 12:56pm UTC
Ok Found the problem, glew had to be initialized after the window has been created not before..