summaryrefslogtreecommitdiffstats
path: root/common.h
diff options
context:
space:
mode:
authorRichard Grenville <[email protected]>2013-01-30 13:41:08 +0800
committerRichard Grenville <[email protected]>2013-01-30 13:41:08 +0800
commit646390149399214ca725b93328e04e71361caa02 (patch)
treea15d118aa7a5a2c325116d46815f0f05ad98faa3 /common.h
parente5264dd40304d434585bffa0933ca5fe285035aa (diff)
downloadtdebase-646390149399214ca725b93328e04e71361caa02.tar.gz
tdebase-646390149399214ca725b93328e04e71361caa02.zip
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().
Diffstat (limited to 'common.h')
-rw-r--r--common.h12
1 files changed, 10 insertions, 2 deletions
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 ===