Details
-
Suggestion
-
Resolution: Out of scope
-
P2: Important
-
4.5.3
-
None
Description
If you look in the list there are a few references to how this would be handy for users.
http://lists.trolltech.com/qt-interest/2008-10/thread00594-0.html
" You might want to
send a feature request to Qt support asking for member functions in
QGLContext to get the native context handle and to create a QGLContext
wrapper around a native context handle.
"
This older one also provides a workaround.
http://lists.trolltech.com/qt-interest/2006-04/msg00313.html
"
I just hate tearing...
On the Apple, this is what you want. Make sure the QGLContext is
current before doing this.
#ifdef _APPLE_
AGLContext aglContext;
aglContext = aglGetCurrentContext();
GLint swapInt = 1;
aglSetInteger(aglContext, AGL_SWAP_INTERVAL, &swapInt);
#endif
This does of course restrict your frame rate to the monitors refresh
rate... (do other work on threads if that's a problem).
But ah, it's just lovely to look at
Oh, you'll need this include file too, and don't forget to add the
AGL Framework:
#include <AGL/agl.h>
"