Search code examples
openglhardwaredrivers

My OpenGL Version doesn't support Buffer Binding


Why is this? I'd like to know because in a LOT of articles and various tutorials I see on the Internet it's hard NOT to see something which doesn't deal with buffer binding. The only bind function I have is glBindTexture. Does this mean my drivers are significantly outdated?

Edit

Sorry for lack of information. My OpenGL version 3.1 from an Intel integrated GPU. Also, the reason why I thought that I lacked functions such as glBindBuffer is mainly because it wouldn't show up in Qt as a function I could use in my auto-completion.


Solution

  • The only bind function I have is glBindTexture

    Most likely you're fooled by the way OpenGL implementations export their functionality. opengl32.dll on Windows will and libGL.so most likely will give you only OpenGL-1.1 functionality (Windows Vista and / actually do give you OpenGL-1.4 and most Linux/BSD drivers will give you OpenGL-2.1). Anything beyond (and buffer objects go beyond) must be loaded through the so called extension system.

    Most easy and reliable way to do this:

    1. Go to http://glew.sf.net get the version matching your development environment
    2. Install GLEW in development environment
    3. Replace all occurences of #include <GL/gl.h> with #include <GL/glew.h>
    4. Call glewInit() in your code after a OpenGL context has been made current.