Can't use glGenBuffers (or any other VBO methods)

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
GlennNZ
Posts: 25
Joined: Sat Jan 13, 2007 1:13 pm

Can't use glGenBuffers (or any other VBO methods)

Post by GlennNZ »

I'm trying to convert some of my vertex arrays to vertex buffer objects (using pspgl), but my compiler doesn't want to know.
src/Model.cpp:863: error: ‘glGenBuffers’ was not declared in this scope
src/Model.cpp:864: error: ‘glBindBuffer’ was not declared in this scope
src/Model.cpp:865: error: ‘glBufferData’ was not declared in this scope
* I've included gl.h and glext.h
* My makefile has -lGL, -lGLES and -lGU
* I noticed the pspgl is still at revision 2452 but just to make sure, I reinstalled pspgl
* All my vertex array stuff works fine.
* Tried using glGenBufferARB

I'm pretty stumped. From looking at the pspgl website and noticing the three other threads that talk about use of VBOs, I'm assuming this is supposed to be straight forward.

Can anyone offer me any insight?

Cheers
longjoel
Posts: 14
Joined: Thu Jan 29, 2009 4:06 am

Re: Can't use glGenBuffers (or any other VBO methods)

Post by longjoel »

GlennNZ wrote:I'm trying to convert some of my vertex arrays to vertex buffer objects (using pspgl), but my compiler doesn't want to know.
src/Model.cpp:863: error: ‘glGenBuffers’ was not declared in this scope
src/Model.cpp:864: error: ‘glBindBuffer’ was not declared in this scope
src/Model.cpp:865: error: ‘glBufferData’ was not declared in this scope
* I've included gl.h and glext.h
* My makefile has -lGL, -lGLES and -lGU
* I noticed the pspgl is still at revision 2452 but just to make sure, I reinstalled pspgl
* All my vertex array stuff works fine.
* Tried using glGenBufferARB

I'm pretty stumped. From looking at the pspgl website and noticing the three other threads that talk about use of VBOs, I'm assuming this is supposed to be straight forward.

Can anyone offer me any insight?

Cheers
I don't have any advice to offer, but if you can figure this out, I would be interested in hearing what you figure out. When I start my next project, I would like to use buffers as well.
GlennNZ
Posts: 25
Joined: Sat Jan 13, 2007 1:13 pm

Post by GlennNZ »

Thanks to my programming colleague, I have a solution.

Code: Select all

#define GL_GLEXT_PROTOTYPES
...is required before including the glext header.

If I'd looked more carefully at the glext.h file, there is the line

Code: Select all

#ifdef GL_GLEXT_PROTOTYPES
Lesson learned (perhaps)
longjoel
Posts: 14
Joined: Thu Jan 29, 2009 4:06 am

Post by longjoel »

GlennNZ wrote:Thanks to my programming colleague, I have a solution.

Code: Select all

#define GL_GLEXT_PROTOTYPES
...is required before including the glext header.

If I'd looked more carefully at the glext.h file, there is the line

Code: Select all

#ifdef GL_GLEXT_PROTOTYPES
Lesson learned (perhaps)
Thanks a bunch.
Post Reply