"GL/gl.h" and not "SDL_opengl"?

All the source code I have seen thus far includes “GL/gl.h” and not “SDL_opengl”. “SDL_opengl” does not include the base OpenGL types, e.g…

typedef float GLfloat; /* single precision float */

… which are necessary. As these are defined in “gl.h”, this file must be included. If this is the case, then is “SDL_opengl” ever used ?

-Luke

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1On Saturday 09 November 2002 09:23, Luke J Crook wrote:

All the source code I have seen thus far includes “GL/gl.h” and not
"SDL_opengl". “SDL_opengl” does not include the base OpenGL types, e.g…

typedef float GLfloat; /* single precision float */

… which are necessary. As these are defined in “gl.h”, this file must
be included. If this is the case, then is “SDL_opengl” ever used ?

SDL_opengl.h includes GL/gl.h, or whatever the file is called, depending on
the OS. So GLfloat etc. should in fact be defined.

cu,
Nicolai
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE9zQLGsxPozBga0lwRAn2bAJsFVbRdbE2bxfL8IrN88Pdk7+uaRwCgj/iS
A1bC0zokzApb4SnAwzr23IM=
=KrmM
-----END PGP SIGNATURE-----

Luke J Crook wrote:

All the source code I have seen thus far includes “GL/gl.h” and not
"SDL_opengl". “SDL_opengl” does not include the base OpenGL types, e.g…

typedef float GLfloat; /* single precision float */

SDL_opengl does something better, ie it includes GL/gl.h itself, with
the added bonus that it will include OpenGL/gl.h instead on a macosx. So
your code will be more portable.

… which are necessary. As these are defined in “gl.h”, this file must
be included. If this is the case, then is “SDL_opengl” ever used ?
Yes, for portability !

Stephane

hello i have a question somewhat regarding this…

does sdl_opengl include glu and/or glut?

Also i was wondering how would you draw a sphere without either of those?
Ive not heard many good things about glut so im wary to use it or glu (which
i havent heard much about) but would still like to be able to draw spheres.> ----- Original Message -----

From: stephane.marchesin@wanadoo.fr (Stephane Marchesin)
Newsgroups: loki.open-source.sdl
To:
Sent: Saturday, November 09, 2002 4:44 AM
Subject: Re: [SDL] “GL/gl.h” and not “SDL_opengl” ?

Luke J Crook wrote:

All the source code I have seen thus far includes “GL/gl.h” and not
"SDL_opengl". “SDL_opengl” does not include the base OpenGL types,
e.g…

typedef float GLfloat; /* single precision float */

SDL_opengl does something better, ie it includes GL/gl.h itself, with
the added bonus that it will include OpenGL/gl.h instead on a macosx. So
your code will be more portable.

… which are necessary. As these are defined in “gl.h”, this file must
be included. If this is the case, then is “SDL_opengl” ever used ?
Yes, for portability !

Stephane


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

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

hello i have a question somewhat regarding this…

does sdl_opengl include glu and/or glut?

SDL_opengl.h isn’t protected by magic incantations. You can just open it,
and it’s plain to see that it includes both gl.h and glu.h, but not glut.h
(GLUT is mostly a toolkit anyway, which you don’t need when using SDL).

Also i was wondering how would you draw a sphere without either of those?

Tesselate the sphere into individual polygons yourself, using basic
trigonometric functions (sin and cos).

cu,
Nicolai
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE9zXkUsxPozBga0lwRAt3kAJ9TVV56W0or031w1TOVrDtpgmZacACfWO5o
PY97/ouBqD5HZtSf8O342Y4=
=uTxd
-----END PGP SIGNATURE-----On Saturday 09 November 2002 21:31, Atrix Wolfe wrote:

En r?ponse ? Luke J Crook :

All the source code I have seen thus far includes “GL/gl.h” and not
"SDL_opengl". “SDL_opengl” does not include the base OpenGL types,
e.g…

typedef float GLfloat; /* single precision float */

… which are necessary. As these are defined in “gl.h”, this file must
be included. If this is the case, then is “SDL_opengl” ever used ?

-Luke

no

sylvain