Ticket #520 (closed enhancement: fixed)
Vsync is not implemented in Linux
|Reported by:||lubosz||Owned by:|
|Priority:||Nice to Have||Milestone:|
|Component:||Core engine||Keywords:||vsync opengl glext glxext glx|
I use glXSwapIntervalSGI to activate vsync in Linux. This is found in GL/glxext.h. Which needs GL/glx.h. I put those inlcudes to the according places where i found the wgl.h and wglext.h Windows ones.
More information about this extension: http://www.opengl.org/registry/specs/SGI/swap_control.txt
The problem is that glx.h inludes X11/X.h which defines Cursor. So i replaced the Cursor stuff in cursor.cpp with GameCursor?... I have no other idea how to solve this. Maybe using namespaces?
The other mystery is that ogl_HaveExtension("GLX_SGI_swap_control") returns false. Do I have to register it somewhere? I did not get the magic of ogl_HaveExtension in ogl.cpp. But it runs without checking for me. This should be temporary.
The ifdefs are confusing with OS_WIN, OS_MACOSX and OS_MAC. Is there OS_UNIX or OS_LINUX? So I could ensure a better separation. Maybe this extension could be usefull in OS X too, but I can't test it.