PDA

View Full Version : glGenBuffers’ was not declared in this scope



mikethebike
11-27-2009, 04:41 AM
Hi
Errormsg: ‘glGenBuffers’ was not declared in this scope

I'm using the latest openGL
3.2 Nvidia driver 32bit on openSuse 11.2
glext is included. I checked within glext.h and found it.
What else could I try?
Michael

michael@23-194-pool:~> glewinfo | grep glGenBuffer
glGenBuffers: OK
glGenBuffersARB: OK
michael@2-194-pool:~>

marshats
11-30-2009, 10:04 AM
Try adding the GL_GLEXT_PROTOTYPES before your include
ie


#define GL_GLEXT_PROTOTYPES
...
#include <glext.h>

or if using gcc compiler just add -DGL_GLEXT_PROTOTYPES to your compile command

I see you are using glewinfo -- excellent. Why not use it also within your code since it is more general approach that helps with openGL extensions see GLEW (http://glew.sourceforge.net/) and it's Basic Usage (http://glew.sourceforge.net/basic.html). Note with GLEW you don't need to worry about adding GL_EXT_PROTOTYPES define macro. It takes care of that and lots of other things for you.