Re: x11-users digest, Vol 1 #462 - 7 msgs
Re: x11-users digest, Vol 1 #462 - 7 msgs
- Subject: Re: x11-users digest, Vol 1 #462 - 7 msgs
- From: Steven Langer <email@hidden>
- Date: Thu, 6 Nov 2003 19:43:09 -0800
Message: 4
Cc: email@hidden
From: Scott Thompson <email@hidden>
Subject: Re: OpenGL on 10.2.8
Date: Wed, 5 Nov 2003 09:08:32 -0600
To: email@hidden
On Nov 5, 2003, at 7:51 AM, Adrian Clark wrote:
I've just had occasion to build an OpenGL program on my powerbook
running 10.2.8 -- only to find that the relevant files don't appear to
be installed, or at least aren't where gcc expects to find them.
Isn't OpenGL part of the standard developer's kit? I've found an
OpenGL 1.2 directory tree on Apple's FTP site but there is no
indication of where its sub-directories should go!
Any help gratefully received -- and sorry if this is a bit off-topic,
even though I've seen a fair amount of OpenGL-related stuff on this
list recently.
..Adrian
The OpenGL headers are available on the system as part of the OpenGL
framework. You should be able to find them at
/System/Library/Frameworks/OpenGL.framework/Versions/Current/Headers
If you are using gcc from the command line to compile them then you
need to be sure that your gcc line includes the option
-framework OpenGL
This will not only tell the compiler where to find the headers, it will
also tell the linker to include the appropriate shared library
references and such.
Another common problem with compiling OpenGL code from other platforms
on Mac OS X is that often contains includes of the form:
#include <GL/gl.h>
While Mac OS X would rather you used:
#include <OpenGL/gl.h>
You might try the mac-opengl list or xcode-users, both hosted at
lists.apple.com, if you run into further problems.
Scott
Many OpenGL related headers can be found in
/System/Library/Frameworks/OpenGL.framework/Versions/Current/Headers.
The gl.h there contains a couple instances of the C++ "//" comment
declaration which cc does not like. I fixed that and continued trying
to build my program. The next problem I found is that there is no
glx.h in this directory. In essence, this means that this directory
has headers for building aqua OpenGL programs. All Unix/X11 OpenGL
programs I have seen use glx calls to create their 3D windows (even
when running locally), so glx.h is required.
glx.h may be found in /usr/X11R6/include/GL, which also has a gl.h.
The two gl.h files are different. On my Linux system, the GL headers
can be found at /usr/include/GL and at
/usr/share/doc/NVIDIA_GLX-1.0/include/GL. The version in the NVIDIA
directory is the one that declares the extensions that are available
for my graphics adapter. I think the ones in /usr/include/GL are the
Mesa headers which would not allow me to take advantage of the
special features of my graphics card.
My question, probably for someone at Apple, is which headers should I
be using on my 10.3 Mac?
Thanks,
Steve Langer
_______________________________________________
x11-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/x11-users
X11 for Mac OS X FAQ: http://developer.apple.com/qa/qa2001/qa1232.html
Report issues, request features, feedback: http://developer.apple.com/bugreporter
Do not post admin requests to the list. They will be ignored.