OpenGL 3.2 Tutorial needed (Preferably Mac)


I’ve been doing my best to understand OpenGL on the Mac platform. Currently it is supporting 3.2. I’d like to find a resource out there that does only 3.2 stuff.

I’ve managed to find a really good tutorial on (I hope it’s ok to mention other sites here).

I’ve run into a texture problem and I don’t know where to turn. I am looking for simplicity.

I guess it’s back to breaking things down to their simplest parts.

OpenGL is really cool, learning it however is bit of a learning curve.

Shooting from the hip; Can someone tell me why the samples programs off of using GLEW & GLFW only consume like 1% of my CPU while the GLUT consumes over 100% of the CPU?

Just wondered if there is anyone out there that can answer that off hand.



That depends upon the code in question. A common mistake is to misuse glutIdleFunc(). An idle function will be called repeatedly while no events are pending. If the idle function doesn’t call any blocking functions, and either it doesn’t cause any events to be generated or the generated events can be processed quickly, it can end up consuming close to 100% CPU (at least for a single core). Note that glutPostRedisplay() typically won’t block, and redraw events generated while a buffer swap is pending may be queued or coalesced rather than resulting in a direct call to the display function.

For animation, use a timer function.

Idle functions should be reserved for coalescing updates. E.g. if you want to call an update function in response to an event, and a series of events should only call the function once (rather than once per event), register the idle function when the event occurs and have the idle function de-register itself (with glutIdleFunc(NULL)) upon completion.