 |
 |
Open GL,Objective C,and Java 3D API
|
 |
|
 |
|
Forum Regular
Join Date: Dec 2000
Location: Rehoboth Beach,DE USA
Status:
Offline
|
|
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
|
|
|
|
|
|
| |
|
|
|
 |
|
 |
|
Admin Emeritus 
Join Date: Oct 2000
Location: Boston, MA
Status:
Offline
|
|
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
|
|
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
|
|
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
|
|
|
|
|
"Against stupidity, the gods themselves contend in vain" (Schiller)
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
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
|
|
|
|
|
|
 |
 |
 |
 |
|
 |
|