On 14 Nov 2004, at 13:42, Arthur Wiebe wrote:

What needs to be done is something like this
if (defined("macintosh") {
  #include <OpenGL/gl.h>
}
else {
  #include <GL/gl.h>
}

Can you tell that I don't program in C? :)

Two things - please use __APPLE__ to detect OS-X, 'macintosh' is more for Classic era stuff (though still works, of course)


Secondly, Flightgear in most places has #defines for gl.h and glu.h, which are setup by configure. The files you have encountered are the ones that have been added since I sent Curt the changes (probably two years ago) for the FG_GL stuff, I think.

My current inclination (which I've done in other projects) is to make a 'fg_gl.h' which simply includes the #ifdef test you have above, and use that everywhere instead of the system GL headers. This needs to be done for glu, glut and gtlext.h as well, of course.

The reason I haven't done that yet is, SDL already has a header that does this (SDL/SDL_gl.h), any scene graph FG switches to will also do this, and PLIB probably ought to be doing it, I'm just too busy to fight to get patches into plib. Doing it locally in FG will work, of course, but is slightly redundant.

BTW, I have local changes to built with XCode, run as a bundle, with PLIB and SimGear as private frameworks, I'm just having some SDL startup issues I haven't had time to look at.

H&H
James
--
Morbo finds all humans pathetic


_______________________________________________ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel 2f585eeea02e2c79d7b1d8c4963bae2d

Reply via email to