Jump to content
  • Advertisement
Sign in to follow this  

Opengl VAO and VBO's crash program

This topic is 2437 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I am trying simple tutorials to create objects using vbo's and vao's. I am not allowed to use glut. My program's keep crashing if glGenVertexArrays or glGenBuffers are added. I've looked around but I'm cannot find why these will work for other's and not for me. Please can someone help me.

Share this post


Link to post
Share on other sites
Advertisement
What OpenGL context context do you create? A plain old 2.1 one or a 3.x or 4.x one? glGenVertexArrays is only available from OpenGL 3.0.

Share this post


Link to post
Share on other sites
If you're on Windows a crash as soon as you attempt to use any OpenGL function above version 1.1 is normally a good indication that you never loaded the function pointers. Have a look here for explanation and sample code: http://www.opengl.org/resources/code/samples/sig99/advanced99/notes/node396.html

It may also be the case that you're doing something else wrong of course, but loading the function pointers (and ensuring that they're not NULL after you've loaded them) is the first thing you should check.

Share this post


Link to post
Share on other sites
I had this problem too. Use GLEW or GLEE to load in the OpenGL functions > version 1.1.

if you use glew, you #include the .h, add the .c to the project, call glewInit(); after setting up your pixel format, and then use the newer OpenGL functionality.

I'm responsible for 4-5 posts on this forum going through the same issue, figure i should give back to the community :D

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!