Using OpenGL 1.5 functions

Apprentice
Posts: 19
Joined: 2005.11
Post: #1
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
Quote this message in a reply
Oldtimer
Posts: 834
Joined: 2002.09
Post: #2
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
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #3
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.
Quote this message in a reply
Apprentice
Posts: 19
Joined: 2005.11
Post: #4
Thanks Fenris and OneSadCookie for replying so quickly.

Anyway, Fenris:

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

and I just tried to do this:

Code:
    glGenBuffers(1, &amp;vboIdentifier);

OneSadCookie:
What do you mean? Should I make extern declarations for all the functions I need, or what?
Quote this message in a reply
Sage
Posts: 1,232
Joined: 2002.10
Post: #5
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.
Quote this message in a reply
Apprentice
Posts: 19
Joined: 2005.11
Post: #6
Thanks Arekkusu. I'll try those declarations.
Quote this message in a reply
Member
Posts: 144
Joined: 2004.07
Post: #7
or just checkout/use GLEW
Quote this message in a reply
Sage
Posts: 1,199
Joined: 2004.10
Post: #8
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.
Quote this message in a reply
Apprentice
Posts: 19
Joined: 2005.11
Post: #9
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.
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Functions not being initialised onKeyDown Yendall 1 1,038 Apr 15, 2014 01:31 PM
Last Post: OneSadCookie
  Some quick help getting started with certain Carbon functions zmwworm 12 8,114 Jan 10, 2008 01:14 AM
Last Post: zmwworm
  Intel Mac -&gt; Many Warnings (deprecated functions) dave05 3 4,479 Sep 6, 2006 03:19 PM
Last Post: aarku
  Arrays or variables containing executable functions Jones 4 4,704 Jun 2, 2006 08:35 AM
Last Post: Zekaric
  Struct based functions Jones 9 5,468 May 9, 2006 02:37 PM
Last Post: Zekaric