Archive for the 'Apple' Category

Avoiding OpenGL frame tearing on OS X

If you are writing OpenGL code for OS X and you are using NSOpenGL or CGL (Core OpenGL), you may notice you get frame tearing (meaning you can see the view port updating with the naked eye) even if you are using glutSwapBuffers.

The solution is to set a CGL option that syncs the vsynch to the current display frame rate so that you avoid tearing. In your drawing code, just before your glFlush (or equivalent), add the following code:

GLint swapInterval = 1;
CGLSetParameter(CGLGetCurrentContext(), kCGLCPSwapInterval, &swapInterval);

OpenGL on the Mac (Part 2): Building GLSL Shaders

Xcode 3.1: Open Quickly and AppleScripts

OpenGL on the Mac (Part 1): Using GLUT

Review: Apple Time Capsule

Back in the Bay

A tale of two developer sites

Detecting conflicting Objective-C category methods

Leaving me wanting

iPhone SDK on the way