Re: Problems compiling OpenGL app with FBO extensions
Re: Problems compiling OpenGL app with FBO extensions
- Subject: Re: Problems compiling OpenGL app with FBO extensions
- From: Jeffrey Wilson <email@hidden>
- Date: Fri, 7 Dec 2007 22:33:53 -0500
On Dec 7, 2007, at 3:11 PM, Robert Purves wrote: Richard Young wrote:
I'm using a G5 ppc with Mac OS X 10.4.7 and am compiling an OpenGL
application using some FBO extentions. I'm completely new to Mac
development, so I don't know what I'm doing. I've downloaded xCode 2.5 and
I've got all a project setup and my source code is including the appropriate
glext.h header file.
When I compile my application, I'm getting these errors:
'glGenFramebuffersEXT' undeclared (first use this function)
'GL_FRAMEBUFFER_EXT' undeclared (first use this function)
'glBindFramebufferEXT' undeclared (first use this function)
'glGenerateMipmapEXT' undeclared (first use this function)
'GL_COLOR_ATTACHMENT0_EXT' undeclared (first use this function)
'glFramebufferTexture2DEXT' undeclared (first use this function)
'glGenRenderbuffersEXT' undeclared (first use this function)
...
...
'glDeleteFramebuffersEXT' undeclared (first use this function)
'glDeleteRenderbuffersEXT' undeclared (first use this funciton)
Since OS X 10.4, glext.h defines GL_EXT_framebuffer_object, which in turn governs the definition of the symbols you list. Perhaps you are #including some antique glext.h directly. In Mac programming, you should use framework-style includes as shown below:
#include <OpenGL/OpenGL.h> int main( void ) { int x = GL_EXT_framebuffer_object; // error if symbol not defined return 0; }
See also the excellent documentation: <http://developer.apple.com/documentation/GraphicsImaging/Conceptual/OpenGL-MacProgGuide/index.html>
Robert P.
Well, I will throw in my two cents here, since I help develop a MMORPG that uses OpenGL. The glext.h that ships with OS X is antiquated. In fact, just take a look at the version number in the system's glext.h on Leopard.
#define GL_GLEXT_VERSION 7
7? Can this be some sort of odd typo? Oddly, the 10.3.9 SDK's X11 glext.h has the following:
#define GL_GLEXT_VERSION 17
Anyhow, I do not rely on these glext.h files. Grab the most recent one from the source:
Jeff |
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden