Wednesday, June 25, 2008

GLOSX Quick Trick

If you're using GLUT in OS X and you need to enable VSync you can do it by adding the following two lines of code to your project and including

int vsync = 1;
CGLSetParameter(CGLGetCurrentContext(), kCGLCPSwapInterval, &vsync);

I usually toss it in right after my call to glutCreateWindow.

No comments: