because defining it before including glut generated more error…also I replaced PFNGLTEXIMAGE3DPROC with glTexImage3DEXTProcPtr, but it still gives me “error: glTexImage3DEXTProcPtr does not name a type”, I don’t know where went wrong
Also, I know that wglGetProcAddress doesn’t work on OS X, so how should this be implemented?
I have ported a software from Windows to MacOS X and it seams actually really easy as far as MacOS X already provide an OpenGL 2 implementation. Under Windows I use GLEW to load every functions but under MacOS I just had to replace my #include <GL/glew.h> by #include <OpenGL/gl.h> (Do not remember the actual name of this include but I guest you will find it easely). In conclusion, no need of GetProcessAddress or whatever, just use the function!
This was done on MacOS 10.4… could different with previous release I think.
You haven’t needed to load function pointers since Mac OS X 10.2, at least. They’re “weak linked”, meaning that your application will run (but the function will be NULL) even if the user is running on an OS version without that function.
For compatibility with Windows/Linux code though, it’s sometimes useful to use them.
<GLUT/glut.h> includes <OpenGL/gl.h> already, so by the time you define GL_GLEXT_FUNCTION_POINTERS it’s too late. Make sure this is defined before all gl.h is first included.
wow, got that working! thx! turns out I dont need to include glext.h at all, let alone defining GL_GLEXT_FUNCTION_POINTERS
OS X has made it so easy…
one more thing to ask u sadcookie, so I followed ur way to add Cocoa target in order to start a OpenGL application but I found the console missing, is there anyway I can get the console display out so I can get some information from standard output?