OpenGL/glut translated to Cocoa
OpenGL/glut translated to Cocoa
- Subject: OpenGL/glut translated to Cocoa
- From: email@hidden
- Date: Mon, 22 Oct 2001 13:27:28 -0400
I'm trying to port an OpenGL project which was written in c/c++ under
gcc in linux to Cocoa. There are some openGL examples in the developer
tools, but they are all in C from what I could tell. I did find one or
two simple project examples which subclass NSOpenGLView, and that's what
I'm working on now. I haven't worked at all with AGL yet, and I'm hoping
I won't have to (because it intimidates me, frankly - we fear what we
don't understand).
My primary issue is that my original project used many of the glut
callback mechanisms - glutMouseFunc, glutIdleFunc, glutReshapeFunc, and
glutDisplayFunc for example. I realize that I'll be replacing these with
Cocoa functionality, but I was wondering if there is a reasonably
succinct heuristic for converting. Does anyone know of a more complex
Cocoa/openGL example project than the "CocoaOpenGLExample" that will
give me a sense of the way to go about this? I haven't looked at apple's
example code pages for a couple weeks - if there is already such a
project there, i apologize.
Another important question I have (which might be answered by an example
project) is how much functionality I should factor out of the
NSOpenGLView subclass and into, say, a controller object which might be
an outlet of the NSOpenGLView. I suppose it should work either way -
opinions?
I suppose I'd mostly like to get a better sense for what openGL
functionality I can and can't expect to work from within a cocoa project.
-mike nidel