Demo coding for Mac OS X

I´m making a small demo, GLUT works great but I would really like to use AGL in order to gain some speed, and probably make the executale file much smaller and eficent. Should I use Carbon or Cocoa? Why?

But my biggest doubt is what is real difference between OpenGL in Cocoa & Carbon?
which is faster and easier to learn?

Why do you think you will gain some speed by avoiding GLUT?

Your executable file will almost certainly be larger if you stop using GLUT, since you will need to write more code to get things to work.

AGL is only usable from Carbon.

NSGL is the Cocoa equivalent, and that’s what GLUT uses internally.

OpenGL is precisely the same for both. The only thing that differs is how you create your OpenGL context.

Cocoa is easier to learn than Carbon.

Ok, Isee that i probably have a little more control over the creation of the context in GLUT, but would like to have as big an increase as I can get, while drawing in fullscreen.

I guess my question might have been wrong, so I’ll refrase it. what I need is:
-create an OpenGL context in as little code as posible.
-discard any user input (except for the ESC key)
-draw in fullscreen as fast as the running system would allow.
-Integrate some Altivec operations with the OpenGl code to boost speed.
-make the Executable as small as posible.

So now the question is: Is there a way to achieve all this? If so , what is the recommended way?

Thanks in advanced,
Luis

-create an OpenGL context in as little code as posible.

GLUT will do this in far less code than any alternative.

-discard any user input (except for the ESC key)

GLUT will do this just as well as any alternative, and with less code.

-draw in fullscreen as fast as the running system would allow.

GLUT will do this. Remember to use glutEnterGameMode rather than glutFullScreen.

-Integrate some Altivec operations with the OpenGl code to boost speed.

Your choice of windowing API has no effect on whether you can use Altivec or not.

-make the Executable as small as posible.

Can’t say I’ve benchmarked, but my bet is that GLUT is significantly better in this regard than the other options, too.

So now the question is: Is there a way to achieve all this? If so , what is the recommended way?

AFAICT, GLUT does everything you need at least as well as the alternatives in all cases, and better in many.

[This message has been edited by OneSadCookie (edited 02-08-2003).]

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.