diff options
author | sg215889 <[email protected]> | 2009-07-30 22:09:24 -0700 |
---|---|---|
committer | sg215889 <[email protected]> | 2009-07-30 22:09:24 -0700 |
commit | 9a4619d5ab1c0441dfb273d057e288b4bf4c6dbc (patch) | |
tree | 32a937f2eefbf31f6785b9e2bea805cb0f86cb6c /src/jogl/classes/com/sun/opengl/impl/windows | |
parent | cd0ec06b5e8a5ec39c8162e87d23c935b506021e (diff) |
Fix SwapInterval (return value, check ctx current, egl), add getSwapInterval.
Diffstat (limited to 'src/jogl/classes/com/sun/opengl/impl/windows')
-rw-r--r-- | src/jogl/classes/com/sun/opengl/impl/windows/wgl/WindowsWGLContext.java | 25 |
1 files changed, 4 insertions, 21 deletions
diff --git a/src/jogl/classes/com/sun/opengl/impl/windows/wgl/WindowsWGLContext.java b/src/jogl/classes/com/sun/opengl/impl/windows/wgl/WindowsWGLContext.java index 1bc3acada..92a563445 100644 --- a/src/jogl/classes/com/sun/opengl/impl/windows/wgl/WindowsWGLContext.java +++ b/src/jogl/classes/com/sun/opengl/impl/windows/wgl/WindowsWGLContext.java @@ -332,29 +332,12 @@ public class WindowsWGLContext extends GLContextImpl { } } - public boolean isFunctionAvailable(String glFunctionName) - { - boolean available = super.isFunctionAvailable(glFunctionName); - - // Sanity check for implementations that use proc addresses for run-time - // linking: if the function IS available, then make sure there's a proc - // address for it if it's an extension or not part of the OpenGL 1.1 core - // (post GL 1.1 functions are run-time linked on windows). - /* FIXME: - assert(!available || - (getGLProcAddressTable().getAddressFor(mapToRealGLFunctionName(glFunctionName)) != 0 || - FunctionAvailabilityCache.isPartOfGLCore("1.1", mapToRealGLFunctionName(glFunctionName))) - ); */ - - return available; - } - - public void setSwapInterval(int interval) { - // FIXME: make the context current first? Currently assumes that - // will not be necessary. Make the caller do this? + protected void setSwapIntervalImpl(int interval) { WGLExt wglExt = getWGLExt(); if (wglExt.isExtensionAvailable("WGL_EXT_swap_control")) { - wglExt.wglSwapIntervalEXT(interval); + if ( wglExt.wglSwapIntervalEXT(interval) ) { + currentSwapInterval = interval ; + } } } |