Access Violation at Address

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
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.
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
I'm not familiar with using glew directly. =x

But yeah I'd recommend getting the unofficial sdk.
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
Ok Found the problem, glew had to be initialized after the window has been created not before..

Topic archived. No new replies allowed.