summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2006-06-13 23:06:25 +0000
committerBrian Paul <[email protected]>2006-06-13 23:06:25 +0000
commitee061060826df059f0ddb904a2160ed610423579 (patch)
tree1b2e9a8bd41b7f360b11bd3e81ad662d2af56505 /src/mesa
parent2d087480b4b1207c058efcccc9a72faedcea4651 (diff)
Do a cheesy implementation of glXWait/GetVideoSyncSGI() functions, but
disable reporting the GLX_SGI_video_sync extension anyway. Google Earth works now.
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/x11/fakeglx.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/src/mesa/drivers/x11/fakeglx.c b/src/mesa/drivers/x11/fakeglx.c
index 259a2950425..39469aec925 100644
--- a/src/mesa/drivers/x11/fakeglx.c
+++ b/src/mesa/drivers/x11/fakeglx.c
@@ -1,6 +1,6 @@
/*
* Mesa 3-D graphics library
- * Version: 6.5
+ * Version: 6.5.1
*
* Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
*
@@ -80,7 +80,7 @@
"GLX_ARB_get_proc_address " \
"GLX_EXT_visual_info " \
"GLX_EXT_visual_rating " \
- "GLX_SGI_video_sync " \
+ /*"GLX_SGI_video_sync "*/ \
"GLX_SGIX_fbconfig " \
"GLX_SGIX_pbuffer "
@@ -2274,19 +2274,26 @@ Fake_glXSwapIntervalSGI(int interval)
/*** GLX_SGI_video_sync ***/
+static unsigned int FrameCounter = 0;
+
static int
Fake_glXGetVideoSyncSGI(unsigned int *count)
{
- (void) count;
+ /* this is a bogus implementation */
+ *count = FrameCounter++;
return 0;
}
static int
Fake_glXWaitVideoSyncSGI(int divisor, int remainder, unsigned int *count)
{
- (void) divisor;
- (void) remainder;
- (void) count;
+ if (divisor <= 0 || remainder < 0)
+ return GLX_BAD_VALUE;
+ /* this is a bogus implementation */
+ FrameCounter++;
+ while (FrameCounter % divisor != remainder)
+ FrameCounter++;
+ *count = FrameCounter;
return 0;
}