Re: learning OpenGL
Re: learning OpenGL
- Subject: Re: learning OpenGL
- From: Hans Andersen <email@hidden>
- Date: Tue, 5 Jun 2001 13:36:46 -0700
It's quite simple to get OpenGL up and drawing in cocoa; just make a
custom subclass of NSOpenGLView, drop it into a test app in IB, and use
IB to set all sort of neat variables like pixel depth and depth
buffers. Then in the code for your NSOpenGLView subclass, override
drawRect: and insert your OpenGL code. Call [myCustomOpenGLView
setNeedsDisplay:YES]; whenever you want the view to redraw itself; on
the next run through the main application loop, drawRect: will be called.
Unfortunately, there's nothing "simple" about OpenGL itself. The
"OpenGL Programming Guide" by Woo, Neider, Davis, and Shreiner (official
guide, w/ red cover) is a great resource, going step-by-step through
OpenGL's features, assuming no prior knowledge. It _does_ assume that
you're programming in an environment that has the GLUT libraries, which
are a set of cross-platform "beginner libraries" that are a great help
in learning OpenGL basics. There is a GLUT.framework in my
HS/System/Library/Frameworks/ , but I've never used it before and I
don't know if it's Carbon or Cocoa or what. It's a start, though.
-Hans Andersen
On Tuesday, June 5, 2001, at 11:33 AM, Stefano Tripi wrote:
Is there something very simple to start learning OpenGL programming on
Cocoa? I found several resources, but unfortunately they're for people
who know already something about OpenGL, and my greatest experience of
OpenGL is using Bryce for 3D pictures :)
----------------
Stefano Tripi -Mac developer-
http://www.stetripi.com/
ICQ: 37838014
----------------
"Think Different." Apple Computers
_______________________________________________
cocoa-dev mailing list
email@hidden
http://www.lists.apple.com/mailman/listinfo/cocoa-dev