GLUT and VBL syncing in Mac OSX

Posts: 2
Joined: 2010.12
Post: #1

i need to enable vertical sync. (because of screen tearing) in my GLUT C++ Mac OS X application...

i did a whole search on this

using aglSetInteger(ctx, AGL_SWAP_INTERVAL, &swapInt)
-> Problem : i cant get the the context, as the aglContext != Glut gl context
-> Question : how to get and use the glut context as the agl context, so i can set the vsync?

or maybe is there some other option, like to vsync with opengl glut on MAC?
GLint sync = 1;
CGLSetParameter(CGLGetCurrentContext(), kCGLCPSwapInterval, &sync);

solved that for meSmile
Quote this message in a reply
Posts: 1,487
Joined: 2002.09
Post: #2
Also, you can set it in the GLUT application's preferences dialog.

Scott Lembcke - Howling Moon Software
Author of Chipmunk Physics - A fast and simple rigid body physics library in C.
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  VBL syncing and threads behavior Sohta 3 4,982 Aug 12, 2004 04:47 PM
Last Post: Sohta