Can't #include <GL/GL.h> on Mac

I’ve installed the SDL framework for my Mac and the project templates for
Xcode but when I create a project I can’t seem to #include <GL/gl.h>. It
says that the file doesn’t exist. The OpenGL framework is there so I don’t
know why it’s complaining. Interestingly, if I get rid of #include <GL/gl.h>
and replace it with #include “SDL_opengl.h” it works fine.

It’s no big deal that I can’t include gl.h because I can just use
SDL_opengl.h. I was just wondering if anyone knew why it is?

I’ve installed the SDL framework for my Mac and the project
templates for Xcode but when I create a project I can’t seem to
#include <GL/gl.h>. It says that the file doesn’t exist. The OpenGL
framework is there so I don’t know why it’s complaining.
Interestingly, if I get rid of #include <GL/gl.h> and replace it
with #include “SDL_opengl.h” it works fine.

It’s no big deal that I can’t include gl.h because I can just use
SDL_opengl.h. I was just wondering if anyone knew why it is?

On OS X systems, the proper headers to include are:

<OpenGL/gl.h>
<OpenGL/glext.h>

Richard SchreyerOn Jun 8, 2006, at 9:53 AM, Darrell Blake wrote:

What the hell? Why did Apple do that?On 6/8/06, Richard Schreyer <rws_list at girr.org> wrote:

On OS X systems, the proper headers to include are:

<OpenGL/gl.h>
<OpenGL/glext.h>

  • SR

Simon Roby wrote:> On 6/8/06, Richard Schreyer <rws_list at girr.org> wrote:

On OS X systems, the proper headers to include are:

<OpenGL/gl.h>
<OpenGL/glext.h>

What the hell? Why did Apple do that?

So that you have a portability reason for including "SDL_opengl.h"
instead :slight_smile:

Stephane

Ah, but that’s not always possible. I use GLEW to import the extensions so
that I can use vertex and fragment shaders but you can’t #include "glew.h"
if you #include “SDL_opengl.h”. It’s all swings and roundabouts.On 6/10/06, Stephane Marchesin <stephane.marchesin at wanadoo.fr> wrote:

Simon Roby wrote:

On 6/8/06, Richard Schreyer <rws_list at girr.org> wrote:

On OS X systems, the proper headers to include are:

<OpenGL/gl.h>
<OpenGL/glext.h>

What the hell? Why did Apple do that?

So that you have a portability reason for including "SDL_opengl.h"
instead :slight_smile:

Stephane


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

Ah, but that’s not always possible. I use GLEW to import the
extensions so that I can use vertex and fragment shaders but you
can’t #include “glew.h” if you #include “SDL_opengl.h”. It’s all
swings and roundabouts.

When you include glew.h you don’t need to include any GL headers.
glew will do it for you.On Saturday 10 June 2006 22:00, Darrell Blake wrote:

On 6/10/06, Stephane Marchesin <stephane.marchesin at wanadoo.fr> wrote:

Simon Roby wrote:

On 6/8/06, Richard Schreyer <rws_list at girr.org> wrote:

On OS X systems, the proper headers to include are:

<OpenGL/gl.h>
<OpenGL/glext.h>

What the hell? Why did Apple do that?

So that you have a portability reason for including "SDL_opengl.h"
instead :slight_smile:

Stephane


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl