iDevGames Forums

Full Version: OpenGL sites
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Simple question; any good sites for learning OpenGL for Cocoa(Obj-C)?

...and I don't want the standard NeHe respone either; the NeHe site in itself is a very good site, but the Cocoa versions of their projects are completely different entities. There always seems to be a lot of extra code stuffed in for the sake of being stuffed in, there are no comments to explain what any of the code does (and that's a problem considering none of the code is the standard code NeHe gives), and there seem to be odd lines of code (i.e. Many If statements all huddled together, with maybe only one or two with brackets to define the statement.)

If there's something I'm missing here, feel free to point it out, but at the moment, NeHe is about as helpful as a smoking monkey, and while it may be neat, a smoking monkey is not what's needed.
OpenGL and Cocoa are unrelated.

Use NeHe to learn OpenGL
Use Apple's tutorials to learn Cocoa
Use Apple's simple Cocoa/OpenGL sample to learn how to put the two together.

ThrottleMonkey

Smoking monkeys are cool! They're usually the product of too much throttle! Grin

Here's a site that was shown to me and it helped TONS. If you look through my thread "Getting Started with OpenGL - Mac" only a few threads below this one, you'll see how everyone helped me out.

This is a link to Apple's "Getting started in OpenGL with Cocoa" help files:

http://developer.apple.com/techpubs/maco...ion_1.html

Hope this helps you like it did me.

Feanor

There is only one site with regular content about both Cocoa and OpenGL -- this one. And it's all in response to questions, so ask away. OSC, GoodDoug, henryj and many others have lots of insight. I even know a couple of things. Rolleyes

I cannot see why you have complaints about Bryan Blackburn's NeHe Cocoa ports. I think they are good examples, but that's just me. The only extra stuff they add that I have noticed is for setting up a proper application environment, with event management and the like.

Instead of considering OpenGL and Cocoa in their full glories, why not tell us what you want to accomplish? I myself prefer to first consider the requirements of the software, and then choose the technological solution second.
Good one Feanor,

Ah there IS NeHeX, but we need to get together to lend a hand there.
The thing about OpenGL in Cocoa is the evil details... stupid little things like having to call (clearDrawable),(setView) in the update method of an OpenGLView. Little evil things that are blatantly unpolished interms of apple work. I keep hitting them while developing CocoaBlitz. I should start an OpenGL in Cocoa website... So much to do, so little time...

Feanor

Quote:Originally posted by kelvin
The thing about OpenGL in Cocoa is the evil details... stupid little things like having to call (clearDrawable),(setView) in the update method of an OpenGLView. Little evil things that are blatantly unpolished interms of apple work. I keep hitting them while developing CocoaBlitz. I should start an OpenGL in Cocoa website... So much to do, so little time...

I have only ever had to clear the drawable when switching between windowed and fullscreen. If you don't do that, it isn't an issue. And you don't have to use setView at all if you subclass NSOpenGLView -- it does it automatically when you initialize view. CocoaBlitz uses fullscreen, so I can see this would come up for you, but since fullscreen requires a separate context, some management seems inevitable, IMHO.
Reference URL's