summaryrefslogtreecommitdiffstats
path: root/src/native
diff options
context:
space:
mode:
authorKenneth Russel <[email protected]>2005-04-24 00:10:41 +0000
committerKenneth Russel <[email protected]>2005-04-24 00:10:41 +0000
commitbafff33544dae0f28a0a7141d2a4ee05295ea2ec (patch)
tree52ab68a2f188a8f207474ab3c80d2abeaa125bb0 /src/native
parent95a1681443162db968c5430097780bfd0ade0a68 (diff)
Fixed Issue 92: Platform Independent VSync functionality
Added GL.setSwapInterval() which delegates to appropriate platform-dependent routines. Must be called only from within GLEventListener callbacks. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@260 232f8b59-042b-4e1e-8c03-345bb8c30851
Diffstat (limited to 'src/native')
-rw-r--r--src/native/jogl/MacOSXWindowSystemInterface.m6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/native/jogl/MacOSXWindowSystemInterface.m b/src/native/jogl/MacOSXWindowSystemInterface.m
index afa0fea69..6a5969fff 100644
--- a/src/native/jogl/MacOSXWindowSystemInterface.m
+++ b/src/native/jogl/MacOSXWindowSystemInterface.m
@@ -235,3 +235,9 @@ void* getProcAddress(const char *procname)
return NULL;
}
+
+void setSwapInterval(void* context, int interval) {
+ NSOpenGLContext *nsContext = (NSOpenGLContext*)context;
+ long swapInterval = interval;
+ [nsContext setValues: &swapInterval forParameter: NSOpenGLCPSwapInterval];
+}