Hi! I am an OpenGL ultra newbie using Mac OS X Tiger & Xcode. As suggested in the beginners’ tutorials section, I am trying to get the first example from NeHe to work:
NeHe Mac OS X OpenGL tutorial
So far, I’ve opened a Cocoa project, gotten the GLUT framework added to the project, and changed main.m to the example text with the following alteration:
Some people have mentioned conflicts between glut.h and gl.h and/or glu.h. But, deleting the last two lines from above still results in the same error:
ZeroLink: unknown symbol ‘_ReSizeGLScene’
ExploringCocoa-OpenGL has exited due to signal 6 (SIGABRT).
Has anyone else seen this problem? Any help is appreciated.
In the tutorial for Mac OS there is no implementation for the methods DrawGLScene and ReSizeGLScene only definitions are supplied:
GLvoid ReSizeGLScene(int Width, int Height);
So to fix your error you must implement these methods, if you look at the Windows tutorial here, http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=01 there are implementations to these methods.
But you will have to change some things around for example, in the Mac version ReSizeGLScene is defined taking two ints as parameters, but the windows version takes two GLsizei you will have update the Mac version to relieve that error. Also, in the windows tutorial most of the methods return booleans you have to make those void in the Mac version. Likewise, in the Windows version there is an implementation of the GLvoid InitGL(GLvoid); method you can use. And finally when you implement the GLvoid DrawGLScene(GLvoid); make sure you put glFlush(); before you exit the method that will draw to the screen.