Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Using OpenGL

Using OpenGL
Thread Tools
Fresh-Faced Recruit
Join Date: Sep 2001
Status: Offline
Reply With Quote
Sep 12, 2001, 07:21 PM
 
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
Reply With Quote
Sep 13, 2001, 03:03 AM
 
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
Reply With Quote
Sep 14, 2001, 03:07 AM
 
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.
Spectral Class
"Shedding Light on Innovation"
     
Dedicated MacNNer
Join Date: Apr 2001
Location: Bethesda, MD
Status: Offline
Reply With Quote
Sep 14, 2001, 12:40 PM
 
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
Reply With Quote
Sep 16, 2001, 02:05 PM
 
Thanks for all your help ..I got it working!


-Dave
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 12:15 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2