From a8ccbdf228727d8eef7e6684b738a118610b5744 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Thu, 31 Jul 2014 00:48:40 +0200 Subject: GLDrawable: Expose getRequestedGLCapabilities() (Include to public API) In certain cases, it is required to read the user requested capabilities from places other than the user code. Hence adding public method to GLDrawable interface. This removes the need to cast to private GLDrawableImpl, which included such method. --- src/jogl/classes/com/jogamp/opengl/swt/GLCanvas.java | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'src/jogl/classes/com/jogamp') diff --git a/src/jogl/classes/com/jogamp/opengl/swt/GLCanvas.java b/src/jogl/classes/com/jogamp/opengl/swt/GLCanvas.java index eae5948ed..03c6d6929 100644 --- a/src/jogl/classes/com/jogamp/opengl/swt/GLCanvas.java +++ b/src/jogl/classes/com/jogamp/opengl/swt/GLCanvas.java @@ -832,14 +832,10 @@ public class GLCanvas extends Canvas implements GLAutoDrawable, GLSharedContextS return null != _drawable ? (GLCapabilitiesImmutable)_drawable.getChosenGLCapabilities() : null; } - /** - * Accessor for the GLCapabilities that were requested (via the constructor parameter). - * - * @return Non-null GLCapabilities. - */ + @Override public GLCapabilitiesImmutable getRequestedGLCapabilities() { final GLDrawable _drawable = drawable; - return null != _drawable ? (GLCapabilitiesImmutable)_drawable.getNativeSurface().getGraphicsConfiguration().getRequestedCapabilities() : null; + return null != _drawable ? (GLCapabilitiesImmutable)_drawable.getRequestedGLCapabilities() : null; } @Override -- cgit v1.2.3