OpenGL problem (glGenBuffers) - crash (access violation)

Hello, I am using OpenGL to work on graphics and all

I'm using VBO method to generate buffers and do the rest but when I try to do that
specifically when I call the function glGenBuffers, it crashes and it tells me there's a violation of memory or something at address 0x0000000 or something
When I comment "glGenBuffers", the program works just fine

I initialized Glew properly and it works perfectly, I did a check and it equals GLEW_OK

I searched over Google and many people had the same problem as me and most of the solutions presented didn't work for me, I don't know if there's a problem with hardware or something.

My "glGenBuffers" function is as follows:
 
  glGenBuffers(1, &_vboID);


I am following this tutorial:
https://www.youtube.com/watch?v=W_OctRsu754
Each piece of my code is similar to this tutorial, can anyone offer me help?

And thanks in advance
Might help to show more source code. A minimal, compilable example that still replicates the problem would be best. Show your full window and context creation up to the call to glGenBuffers. (And of course always update your drivers in case there is some bug there)
Last edited on
https://www.dropbox.com/s/evpebrw37y0ks6m/BenGraphicsTut6.zip?dl=0

that's all of the code, take a look at it
Anyone??
I'm really lost guys, can anyone hand me a bit of help?
I seem to recall having the same problem a few years ago. Are you using an nVidia or and AMD graphics card?

EDIT* I know you said that you did some research already, but I'll just add the obligatory "You need to create the opengl context first and then initialize glew".
Last edited on
@xismn

I did create the context first and then initialized glew properly


here's my video card specs
http://i.imgur.com/MuXyxn9.png
which I think is a pretty old one, is this cause for the failure of glGenBuffers?
Last edited on
So, you initialized GLEW after calling glfwmakecontextcurrent?

which I think is a pretty old one, is this cause for the failure of glGenBuffers?


I'll reiterate what Ganado said about updating your chipset drivers. Like I said, I've experienced a similar problem once, and I fixed it by updating my drivers.

EDIT - you could also try restoring the pointers to the function(s) in question:

1
2
3
4
5
6
7
8
glGenBuffers = (void(*)(GLenum));
glXGetProcAddressARB((GLubyte*)"glGenBuffers");

glBindBuffer = (void(*)(GLenum));
glXGetProcAddressARB((GLubyte*)"glBindBuffer");

glDeleteBuffers = (void(*)(GLenum));
glXGetProcAddressARB((GLubyte*)"glDeleteBuffers");



It's very possible that the extensions you wish to use aren't supported.
Last edited on
Topic archived. No new replies allowed.