GLUT and VBL syncing in Mac OSX
hello
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
OPTION 1)
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?
thanks
GLint sync = 1;
CGLSetParameter(CGLGetCurrentContext(), kCGLCPSwapInterval, &sync);
solved that for me
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
OPTION 1)
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?
thanks
GLint sync = 1;
CGLSetParameter(CGLGetCurrentContext(), kCGLCPSwapInterval, &sync);
solved that for me
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.
Possibly Related Threads...
| Thread: | Author | Replies: | Views: | Last Post | |
| VBL syncing and threads behavior | Sohta | 3 | 3,041 |
Aug 12, 2004 04:47 PM Last Post: Sohta |
|

