From 646390149399214ca725b93328e04e71361caa02 Mon Sep 17 00:00:00 2001 From: Richard Grenville Date: Wed, 30 Jan 2013 13:41:08 +0800 Subject: Improvement #7: Add GLX_OML_sync_control VSync support - Add "vsync-oml" VSync method, using GLX_OML_sync_control. Untested, because it's not supported by my driver. - Unredirect ps->reg_win, because DRI wiki says it's related to the behavior of OpenGL VSync extensions. - Add glFlush() and glXWaitX() calls, in hope they are slightly helpful for VSync. - Change a few functions to make error handling more graceful. Make some errors fatal. Code clean-up. - Add unused function make_text_prop(). --- common.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'common.h') diff --git a/common.h b/common.h index bc057aa8d..4bc57bb8f 100644 --- a/common.h +++ b/common.h @@ -248,12 +248,16 @@ typedef enum { VSYNC_NONE, VSYNC_DRM, VSYNC_OPENGL, + VSYNC_OPENGL_OML, NUM_VSYNC, } vsync_t; #ifdef CONFIG_VSYNC_OPENGL typedef int (*f_WaitVideoSync) (int, int, unsigned *); typedef int (*f_GetVideoSync) (unsigned *); + +typedef Bool (*f_GetSyncValuesOML) (Display* dpy, GLXDrawable drawable, int64_t* ust, int64_t* msc, int64_t* sbc); +typedef Bool (*f_WaitForMscOML) (Display* dpy, GLXDrawable drawable, int64_t target_msc, int64_t divisor, int64_t remainder, int64_t* ust, int64_t* msc, int64_t* sbc); #endif typedef struct { @@ -536,9 +540,13 @@ typedef struct { /// GLX context. GLXContext glx_context; /// Pointer to glXGetVideoSyncSGI function. - f_GetVideoSync glx_get_video_sync; + f_GetVideoSync glXGetVideoSyncSGI; /// Pointer to glXWaitVideoSyncSGI function. - f_WaitVideoSync glx_wait_video_sync; + f_WaitVideoSync glXWaitVideoSyncSGI; + /// Pointer to glXGetSyncValuesOML function. + f_GetSyncValuesOML glXGetSyncValuesOML; + /// Pointer to glXWaitForMscOML function. + f_WaitForMscOML glXWaitForMscOML; #endif // === X extension related === -- cgit v1.2.1