Simple OpenGL/Xcode Question. - Printable Version
+- iDevGames Forums (http://www.idevgames.com/forums)
+-- Forum: Development Zone (/forum-3.html)
+--- Forum: Game Programming Fundamentals (/forum-7.html)
+--- Thread: Simple OpenGL/Xcode Question. (/thread-5186.html)
Simple OpenGL/Xcode Question. - loopfick - Aug 9, 2005 09:27 AM
I have a very easy question: Has anyone ever gotten the NeHe OpenGL tutorials to work with Xcode?
I won't post any problems I'm having...I just want to know if anyone has gotten them to work...then I'll post the errors. I'm missing something very simple, obviously.
The only tutorial that works for me is OneSadCookie's GLUT tutorial.
Simple OpenGL/Xcode Question. - unknown - Aug 9, 2005 09:41 AM
I got the ones Ive tried to work.
Some are made for xcode (Download the Cocoa/Mac OS X version) but they sometimes need you to add the OpenGL libraries for it to compile. In Target inspector/Build Phases add OpenGL.framework to Frameworks and Libraires group. It is the equavalent of adding -I/System/Library/Frameworks/OpenGL.framework/Headers to the gcc call.
Simple OpenGL/Xcode Question. - loopfick - Aug 9, 2005 10:01 AM
Thank you for answering my question. I did add the GLUT and OpenGL frameworks to the project. I guess I'll try to look at the Mac OS downloads, but I prefer to use Carbon or C++.
That's the error I'm getting with the first tutorial...
ZeroLink: unknown symbol '_ReSizeGLScene'
Executable â€œffdffâ€ has exited due to signal 6 (SIGABRT).
Simple OpenGL/Xcode Question. - longjumper - Aug 9, 2005 10:42 AM
That means you don't have a function defined called ReSizeGLScene, and you are trying to call it somewhere.
Simple OpenGL/Xcode Question. - loopfick - Aug 9, 2005 11:11 AM
Hi Long Jumper!
Yes...I thought that this function would be defined in the GLUT or OpenGL framework...but I'm sure I'll figure out where it is.
Simple OpenGL/Xcode Question. - unknown - Aug 9, 2005 11:32 AM
If there is a glutReshapeFunc(void (*func)(int width, int height)) where ReSizeGLScene is passed when somthing else like resizeGLScene is defined?
Simple OpenGL/Xcode Question. - loopfick - Aug 9, 2005 11:55 AM
Oh...I'M supposed to define the function! Sorry...
Simple OpenGL/Xcode Question. - longjumper - Aug 9, 2005 03:34 PM
Yes, GLUT works in a way where it does all the work of calling your functions when the application needs to. You simply just send a function to one of the glut*Func's, depending on what you want to do. There is a whole less of them, the important one is the drawing function, which I can't think of the name of right now.
Simple OpenGL/Xcode Question. - unknown - Aug 9, 2005 03:40 PM
Its glutDisplayFunc(myFunc) to make myFunc the graphics callback.
Simple OpenGL/Xcode Question. - loopfick - Aug 10, 2005 09:20 AM
Thank you for the replies! I got the tutorials working now. I guess it just wasn't obvious to me that I could use any function I wanted to to do the drawing. In the first NeHe tutorial, the drawing functions weren't defined, and I thought they were supposed to be in the frameworks...
Since I was going with the logic that 'if I can't get the first tutorial right, then why do the second?', I never saw that in the second tutorial, they are defined!
Simple OpenGL/Xcode Question. - Volte - Sep 8, 2005 09:54 AM
EDIT: Never mind, was on the compete wrong track. Got things working now. (Thanks to Keith) http://onesadcookie.com/~keith/XcodeGLUT