Sorry if this is a really stupid question, but I can’t seem to get this right. On the NeHe site, I’ve been trying to put in the code for the very first tutorial, but the build fails and it tells me “Undefined symbols: _DrawGLScene _InitGL _ReSizeGLScene” This is the code from the page:
#define kWindowWidth 400
#define kWindowHeight 300
GLvoid ReSizeGLScene(int Width, int Height);
int main(int argc, char** argv)
glutInitDisplayMode (GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH);
glutInitWindowSize (kWindowWidth, kWindowHeight);
glutInitWindowPosition (100, 100);
(can be found on http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=MacOSX))
I’m on Mac OS 10.2 and using the Dec. 2002 version of Project Builder. Again, I’m sorry if these are really stupid questions with obvious answers, I am very new to OpenGL. Thanks for any help.
There should be another .c file that comes with the tutorial that defines these functions. You will need to add that file to your project too.
[This message has been edited by OneSadCookie (edited 03-05-2003).]
Thanks for the reply. I have one more question though. I’ve been searching on the internet for th epast few days for tutorials on OpenGL in Mac OS x that don’t use Cocoa, just C. Do you guys know where I could find some tutorials like these and/or sample source code I could look at to get an idea of how it works. Thanks for any help.
If you do not want to use Cocoa to handle your OpenGL context you should probably investigate some GLUT tutorials. Invest in the Red Book (OpenGL Programming Guide) it will be a great help.
If you are looking at NeHe’s site, many of the tutorials have a GameGLUT version, with a little know-how those aren’t too difficult to getting running under OS X with Project Builder.
Just to save another question, make sure to include the GLUT framework.
The carbon developer documentation on apple.com is a great resource for sample code. Go to developer.apple.com, and into Sample Code. There is a section devoted to just 3d graphics, the code called “Carbon SetupGL” works very well for making a context, plus it has an event manager written for you and shows you how to load textures and other things too.
This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.