 |
 |
Using OpenGL
|
 |
|
 |
|
Fresh-Faced Recruit
Join Date: Sep 2001
Status:
Offline
|
|
I'm taking an OpenGL programming class, and I would love to do the assignments in Mac OS X. . but I cannot figure out how to get it setup so I can compile OpenGL programs. I have downloaded the GLUT header files from apple.com, such as GL/glut.h .etc. But I think I am missing some libraries.
An example program that I have been trying to compile is:
http://www.cs.albany.edu/~erbacher/c...-sun/index.htm
Thanks for any feedback
dave
|
|
|
| |
|
|
|
 |
|
 |
|
Fresh-Faced Recruit
Join Date: Jul 2001
Location: Rehoboth Beach DE
Status:
Offline
|
|
Go to http://nehe.gamedev.net and look on the left hand column for the Open GL tutorials,go to them and at the bottom of each tutorial there is a port of source code for OSX,at least for about half of them.The code is GLUTE-based.Tutorial 1 is a basic GLUTE setup for various OSs,including X.I am working on getting some code together that works in the native Cocoa windowing enviroment,I'd be happy to send it to you or anyone else when I get it working-if you are interested.
|
|
|
| |
|
|
|
 |
|
 |
|
Dedicated MacNNer
Join Date: Jun 2000
Location: Dundas, Ontario, Canada
Status:
Offline
|
|
I wrote a little Tic Tac Toe game last year that you might useful. I wanted to use OpenGLViews embedded in OS X windows (not the GLUT windows that NeHe used) so my source might be useful if you are heading in the same direction.
Check out the source: Tic Tac 3D
Also, if you want to use PB to write the program, you don't need to download any headers from Apple. Just add the GLUT.framework to your program (without GLUT you will still need the OpenGL.framework). Of course, if you need to hand in a full source, using standard includes (not Apple frameworks) might be a safer bet.
Hope that helps,
Jeff.
|
|
|
| |
|
|
|
 |
|
 |
|
Dedicated MacNNer
Join Date: Apr 2001
Location: Bethesda, MD
Status:
Offline
|
|
I've modified your make and .c file so that it compiles and runs on OS X.
Here's where they are:
http://visual.nlm.nih.gov/~dave/cube/
The only change to cube.c is that #include <GL/glut.h> becomes
#include <glut.h>
dave
|
|
|
| |
|
|
|
 |
|
 |
|
Fresh-Faced Recruit
Join Date: Sep 2001
Status:
Offline
|
|
Thanks for all your help ..I got it working!
-Dave
|
|
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |