diff options
Diffstat (limited to 'src/jogl/classes/jogamp/opengl/GLContextImpl.java')
-rw-r--r-- | src/jogl/classes/jogamp/opengl/GLContextImpl.java | 29 |
1 files changed, 9 insertions, 20 deletions
diff --git a/src/jogl/classes/jogamp/opengl/GLContextImpl.java b/src/jogl/classes/jogamp/opengl/GLContextImpl.java index cf4a71a8a..c3fcc5057 100644 --- a/src/jogl/classes/jogamp/opengl/GLContextImpl.java +++ b/src/jogl/classes/jogamp/opengl/GLContextImpl.java @@ -126,6 +126,7 @@ public abstract class GLContextImpl extends GLContext { this.glDebugHandler = new GLDebugMessageHandler(this); } + @Override protected void resetStates() { // Because we don't know how many other contexts we might be // sharing with (and it seems too complicated to implement the @@ -800,24 +801,10 @@ public abstract class GLContextImpl extends GLContext { public abstract ByteBuffer glAllocateMemoryNV(int arg0, float arg1, float arg2, float arg3); - public final void setSwapInterval(final int interval) { - GLContext current = getCurrent(); - if (current != this) { - throw new GLException("This context is not current. Current context: "+current+ - ", this context "+this); - } - setSwapIntervalImpl(interval); - } - protected void setSwapIntervalImpl(final int interval) { /** nop per default .. **/ } - protected int currentSwapInterval = -1; // default: not set yet .. - public int getSwapInterval() { - return currentSwapInterval; - } - /** Maps the given "platform-independent" function name to a real function name. Currently this is only used to map "glAllocateMemoryNV" and associated routines to wglAllocateMemoryNV / glXAllocateMemoryNV. */ - protected String mapToRealGLFunctionName(String glFunctionName) { + protected final String mapToRealGLFunctionName(String glFunctionName) { Map<String, String> map = getFunctionNameMap(); String lookup = ( null != map ) ? map.get(glFunctionName) : null; if (lookup != null) { @@ -832,7 +819,7 @@ public abstract class GLContextImpl extends GLContext { "GL_ARB_pbuffer" to "WGL_ARB_pbuffer/GLX_SGIX_pbuffer" and "GL_ARB_pixel_format" to "WGL_ARB_pixel_format/n.a." */ - protected String mapToRealGLExtensionName(String glExtensionName) { + protected final String mapToRealGLExtensionName(String glExtensionName) { Map<String, String> map = getExtensionNameMap(); String lookup = ( null != map ) ? map.get(glExtensionName) : null; if (lookup != null) { @@ -844,7 +831,7 @@ public abstract class GLContextImpl extends GLContext { /** Helper routine which resets a ProcAddressTable generated by the GLEmitter by looking up anew all of its function pointers. */ - protected void resetProcAddressTable(ProcAddressTable table) { + protected final void resetProcAddressTable(ProcAddressTable table) { table.reset(getDrawableImpl().getGLDynamicLookupHelper() ); } @@ -957,6 +944,8 @@ public abstract class GLContextImpl extends GLContext { */ protected abstract void updateGLXProcAddressTable(); + protected abstract StringBuffer getPlatformExtensionsStringImpl(); + /** * Returns true if the specified OpenGL core- or extension-function can be * successfully called using this GL context given the current host (OpenGL @@ -968,7 +957,7 @@ public abstract class GLContextImpl extends GLContext { * "glPolygonOffsetEXT" or "glPolygonOffset" to check if the {@link * javax.media.opengl.GL#glPolygonOffset(float,float)} is available). */ - public boolean isFunctionAvailable(String glFunctionName) { + public final boolean isFunctionAvailable(String glFunctionName) { // Check GL 1st (cached) ProcAddressTable pTable = getGLProcAddressTable(); // null if ctx not created once if(null!=pTable) { @@ -1023,14 +1012,14 @@ public abstract class GLContextImpl extends GLContext { return false; } - public String getPlatformExtensionsString() { + public final String getPlatformExtensionsString() { if(null!=extensionAvailability) { return extensionAvailability.getPlatformExtensionsString(); } return null; } - public String getGLExtensionsString() { + public final String getGLExtensionsString() { if(null!=extensionAvailability) { return extensionAvailability.getGLExtensionsString(); } |