How to Not Use GLUT?
I can use DevIL to load my images, but how would I display them via OpenGL, without using GLUT??
Use Cocoa, SDL or Carbon instead.
You could take a look at my xcode template to see how Cocoa can be used for OpenGL
http://fax.twilightcoders.net/files/Coco...cation.zip
http://fax.twilightcoders.net/files/Coco...cation.zip
Sir, e^iπ + 1 = 0, hence God exists; reply!
Thanks...
I think I will take the Cocoa route. But I can't make any of the apple tutorials work. Unknown: I can't make your template work either. I got a bunch of errors when I just run it. but when I tweaked it some, I reduced it to 1 error. Something about a nested function:
Hmm, it'd be nice to have an example that simply drew a rectangle using only Cocoa and OpenGL. Most examples out there include GLUT in there. The ones that don't, don't work at all.
The Apple Tutorial: http://developer.apple.com/documentation...ion_3.html
I think I will take the Cocoa route. But I can't make any of the apple tutorials work. Unknown: I can't make your template work either. I got a bunch of errors when I just run it. but when I tweaked it some, I reduced it to 1 error. Something about a nested function:
Code:
const void *get_byte_pointer(void *bitmap)
{
return bitmap;
}Hmm, it'd be nice to have an example that simply drew a rectangle using only Cocoa and OpenGL. Most examples out there include GLUT in there. The ones that don't, don't work at all.

The Apple Tutorial: http://developer.apple.com/documentation...ion_3.html
Obviously it works for you... but it doesn't work for me... when I tried to compile :"error: unrecognised command line option "-fnested-functions". Sorry, i only have a couple of months of experience in this...
change the code in MyOpenGLView.m from
to
Code:
- (void)copyGLtoQuartz {
const void *get_byte_pointer(void *bitmap) { return bitmap; }
...to
Code:
const void *get_byte_pointer(void *bitmap) { return bitmap; }
- (void)copyGLtoQuartz {
...Sir, e^iπ + 1 = 0, hence God exists; reply!

