iDevGames Forums
Using OpenGL 1.5 functions - Printable Version

+- iDevGames Forums (
+-- Forum: Development Zone (/forum-3.html)
+--- Forum: Game Programming Fundamentals (/forum-7.html)
+--- Thread: Using OpenGL 1.5 functions (/thread-4801.html)

Using OpenGL 1.5 functions - ermitgilsukaru - Nov 13, 2005 04:32 PM

Hi, Im new here. I've recently started to try to learn OpenGL, but I've been having some problems.

I'm trying to use Vertex Buffer Objects, but I can't compile any code that uses glBindBuffers, glGenBuffers and others.

The program I'm trying to compile is just a simple GLUT program. I've included the gl.h, glu.h and glut.h headers, and the OpenGL and GLUT frameworks. It compiles just fine If I don't try to use any of the newer OpenGL functions.

I'm using Xcode 1.5, OS 10.3.9, G5 1.6Ghz, and according to the OpenGL Extensions Viewer program all of OpenGL 1.5 is supported.

So, my question is this; How do get access to the newer functions?

I appreciate any help.

-Ásgeir Bjarnason

Using OpenGL 1.5 functions - Fenris - Nov 13, 2005 05:23 PM

That's odd, they should work as-is. Could you please post the #include-lines of your source files?

And by the way, welcome here! Smile

Using OpenGL 1.5 functions - OneSadCookie - Nov 13, 2005 05:54 PM

None of the developer tools that work on 10.3.9 include ARB_vbo stuff in the headers. You'll need to fake up a header yourself, or steal one from somebody on 10.4. Other than that, there is nothing to do; the functions are present in the frameworks for you to link to.

Using OpenGL 1.5 functions - ermitgilsukaru - Nov 13, 2005 06:04 PM

Thanks Fenris and OneSadCookie for replying so quickly.

Anyway, Fenris:

#include <OpenGL/gl.h>
#include <OpenGL/glu.h>
#include <OpenGL/glext.h>
#include <GLUT/glut.h>

and I just tried to do this:

    glGenBuffers(1, &amp;vboIdentifier);

What do you mean? Should I make extern declarations for all the functions I need, or what?

Using OpenGL 1.5 functions - arekkusu - Nov 13, 2005 06:29 PM

The GL headers included in Xcode 2.2 are updated and include all 1.5 functionality. But Xcode 2.2 requires 10.4 or newer.

The VBO #defines you need were posted to the mac-opengl list a while ago.

Using OpenGL 1.5 functions - ermitgilsukaru - Nov 13, 2005 06:52 PM

Thanks Arekkusu. I'll try those declarations.

Using OpenGL 1.5 functions - lightbringer - Nov 13, 2005 08:09 PM

or just checkout/use GLEW

Using OpenGL 1.5 functions - TomorrowPlusX - Nov 14, 2005 05:26 AM

GLEW is -- as far as I'm concerned -- the one true way. It's portable across linux & windows, too, and makes it very easy to check for availability of an extension at runtime, too.

Using OpenGL 1.5 functions - ermitgilsukaru - Nov 14, 2005 08:41 PM

I got it to work with the file Arekkusu gave me, so I'll just leave it as is for now.

Will investigate GLEW at a later date though. Thanks for all the pointers.