|
#1
| |||
| |||
| need help with setting up GLUT/OpenGL on Mac OS X I am taking a computer graphics course this semester and the assignments are designed to work on Linux and Windows. I am wondering if it is possible to compile this on Mac OS X. Attached is the assignment files, including a GLUI include files. Any clue how I can compile this on Mac? --------------- updated: I have compiled the program. However, when I runned it the following errors were showed: [Session started at 2007-01-21 17:21:55 -0500.] Usage: demo [width] [height] Using 300x200 window by default... 2007-01-21 17:21:56.027 monkey[2314] GLUT Fatal Error: internal error: NSInternalInconsistencyException, reason: Error (1002) creating CGSWindow After Google I suspect this is because the cocoa layer is not initialized and can probably be solved by adding NSApplicationLoad. I don't know how I can add that function since this is the first time I program on Mac. Last edited by y10k; January 21st, 2007 at 04:41 PM. |
|
#2
| |||
| |||
| Create a C++ Tool project (or Standard Tool project if you're using C instead of C++) in Xcode. Add the OpenGL and GLUT frameworks to your project. That should be enough to compile GLUT code on Mac OS X. |
|
#3
| |||
| |||
| Quote:
How should I change the include files? #include <GL/gl.h> #include <GL/glu.h> #include <GL/glut.h> It shows error: GL/gl.h: No such file or directory error: GL/glu.h: No such file or directory etc.. |
|
#4
| |||
| |||
| Quote:
It compiled after I changed all the include <GL/...> to include <GLUT/...> However, when I runned the program, it showed: [Session started at 2007-01-21 16:41:47 -0500.] ZeroLink: unknown symbol '_GLUI_Master' monkey has exited due to signal 6 (SIGABRT). |
|
#5
| ||||
| ||||
| Try this: #import <OpenGL/gl.h> #import <OpenGL/glu.h> #import <GLUT/glut.h> |
|
#6
| |||
| |||
| After lots of tweaking, I can compiile the program now. However, when it runs, it shows: [Session started at 2007-01-21 17:21:55 -0500.] Usage: demo [width] [height] Using 300x200 window by default... 2007-01-21 17:21:56.027 monkey[2314] GLUT Fatal Error: internal error: NSInternalInconsistencyException, reason: Error (1002) creating CGSWindow How can I resolve this problem? |
|
#7
| ||||
| ||||
| I used Fink to install glut and glui packages: Code: fink install glut glut-shlibs glui glui-shlibs Code: #include <OpenGL/gl.h> #include <OpenGL/glu.h> #include <GLUT/glut.h> #include <glui.h> Code: CPPFLAGS = -I/sw/include GL_LIBS = -L/sw/lib -lGLU -lGL -lglut -lglui ![]() monkey_main.pngmonkey_control.png |
|
#8
| |||
| |||
| Quote:
Code: glutInit(&argc, argv); |
![]() |
| Bookmarks |
| Thread Tools | |
| |