OpenGL Setup Without GLUT

Posts: 64
Joined: 2005.06
Post: #1
Yes, I know its been asked a thousand times, about three times by myself in the past, but I am still lost.

How do I set up OpenGL in Cocoa? NeHe and all other large resources only tell you how to do it using GLUT (which I don't like, so I don't want to use it), and the sources that don't use GLUT (Apple) aren't very good examples. Now, I do understand the very basics, such as setting up a pixel format, and such. However, I don't know all the steps I have to go through, and what steps I do know, I don't know the order, or everything about them.

I've spent most of today trying to piece it together myself with no luck, and on the net, I've found only bits and pieces here and there, that help me.
Quote this message in a reply
Posts: 434
Joined: 2002.09
Post: #2
Just download Apple's Cocoa or Carbon OpenGL samples.

I also liked the Deep Cocoa site; that framework may not perform as well I'm told, but it does give you a nice way to handle events uniformly between windowed and full-screen.

If you have specific needs that those don't meet (sharing textures with multiple contexts, switchable between full-screen and windowed, etc.) post about it and someone can probably point you in the right direction.

Measure twice, cut once, curse three or four times.
Quote this message in a reply
Posts: 64
Joined: 2005.06
Post: #3
There is actually a tutorial at CocoaDevCentral on switching between windowed and fullscreen, and while it wasn't originally designed for games or OpenGL, it is actually one of the best examples I have found. Other than that, I just want to set up a standard OpenGL context.
Quote this message in a reply
Posts: 916
Joined: 2002.10
Post: #4
subclass NSOpenGLView
use that and create a little view in your window in your nib
then code
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  OpenGL Pixel Buffer Object setup issue dotbianry 2 2,725 Jan 6, 2013 11:03 AM
Last Post: dotbianry
  OpenGL ES2 matrix setup (humbly crawling back) Fenris 2 6,199 Aug 31, 2011 06:47 AM
Last Post: Fenris
  OpenGL and GLUT on MacOSX Salvietta 1 2,249 Sep 19, 2008 12:03 PM
Last Post: OneSadCookie
  Dealing with GLUT and OpenGL... RingoEST 10 5,395 Aug 16, 2008 12:24 AM
Last Post: RingoEST
  bug in OpenGL setup for NSOpenGL subclass (I think) backslash 2 3,573 Jul 18, 2007 01:10 PM
Last Post: backslash