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 > Open GL,Objective C,and Java 3D API

Open GL,Objective C,and Java 3D API
Thread Tools
Forum Regular
Join Date: Dec 2000
Location: Rehoboth Beach,DE USA
Status: Offline
Reply With Quote
Jan 27, 2001, 07:34 PM
 
I would like to know what opinions anyone has on using Open GL with Objective C versus the the Java 3D API,both in Cocoa.Also,does anyone know where I can find some good Open GL documentation.Any info would be appreciated.
     
Mac Enthusiast
Join Date: Feb 2000
Location: Storrs,Connecticut, USA
Status: Offline
Reply With Quote
Jan 28, 2001, 08:05 AM
 
Take a look at http://www.opengl.org/developers/code/tutorials.html for tutorials on OpenGL. They also have a bunch of documentation around there too.

I can't compare the two API's because I've never used the Java 3D API.
     
Admin Emeritus
Join Date: Oct 2000
Location: Boston, MA
Status: Offline
Reply With Quote
Jan 28, 2001, 11:15 AM
 
OpenGL rocks. It's easy to use, try nehe.gamedev.net

The guy there is a windows-nut, but just download the Mac OS X/ GLUT ports, and run through the first couple tutorials.

If you email me <sigma@math.net>, I'll send you a simple OpenGL/Cocoa thing. The idea is this: subclass NSOpenGLView, drag one into the window in IB, change its class to your subclass, then override the drawRect method. [self display] will call it. Anyway, if you want to do anything cool, OpenGL is pretty much the standard for os x 3-D stuff.
"Against stupidity, the gods themselves contend in vain" (Schiller)
     
Junior Member
Join Date: Dec 2000
Location: Houston, TX, USA
Status: Offline
Reply With Quote
Jan 29, 2001, 02:49 PM
 
Do you override drawRect in your custom subclass to include the OpenGL code that creates your images or whatever in the view? Is that how its supposed to work? Also, i see that there is an OpenGL framework in the frameworks directory as well as the GLUT framework which i hear so much about. Is GLUT an umbrella framework that includes OpenGL, or what? One last thing, my hardware does not support OpenGL. Will i not be able to run OpenGL code that i create, or will it just be incredibly slow?
Thanks!
Mike
     
Admin Emeritus
Join Date: Oct 2000
Location: Boston, MA
Status: Offline
Reply With Quote
Jan 30, 2001, 05:13 PM
 
Yes, just override drawRect in your personal class and that'll allow [self display] to do whatever you need to do.

GLUT is a superset of OpenGL.
In GLUT, you can do things like create windows, mouse tracking, etc...

The good thing about using GLUT is that the code is 100% portable. The bad thing is that it's slower.

So when you make your own OpenGL view in Cocoa, you won't be using the GLUT window initialization functions, nor should you use the GLUT event functions.

Some time these days you might be able to reach
http://24.48.124.9/OpenGL.tar

If not, I'm in OS 9 fraggin' (or I just forgot to boot back :-)

It's a really simple (read: unpolished) OpenGL application which uses sliders and color wells to display a pyramid. If nothing else, it'll show you how to use NSTimer :-)
"Against stupidity, the gods themselves contend in vain" (Schiller)
     
Admin Emeritus
Join Date: Oct 2000
Location: Boston, MA
Status: Offline
Reply With Quote
Jan 31, 2001, 10:25 AM
 
Just registered at dyndns.org
http://gilgalad.dyndns.org

is my computer at home. Right now, I have my OpenGL sample up.
"Against stupidity, the gods themselves contend in vain" (Schiller)
     
   
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:13 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