summaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/javax/media/opengl/GLDrawable.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2014-07-31 00:48:40 +0200
committerSven Gothel <[email protected]>2014-07-31 00:48:40 +0200
commita8ccbdf228727d8eef7e6684b738a118610b5744 (patch)
treed2ee4db61f19f04258f06cb4d3af09096e556f79 /src/jogl/classes/javax/media/opengl/GLDrawable.java
parent289ba90b9ce118ba987b47ee70870cca77287cc0 (diff)
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.
Diffstat (limited to 'src/jogl/classes/javax/media/opengl/GLDrawable.java')
-rw-r--r--src/jogl/classes/javax/media/opengl/GLDrawable.java23
1 files changed, 21 insertions, 2 deletions
diff --git a/src/jogl/classes/javax/media/opengl/GLDrawable.java b/src/jogl/classes/javax/media/opengl/GLDrawable.java
index 57883c8ac..ac8644640 100644
--- a/src/jogl/classes/javax/media/opengl/GLDrawable.java
+++ b/src/jogl/classes/javax/media/opengl/GLDrawable.java
@@ -174,17 +174,36 @@ public interface GLDrawable extends NativeSurfaceHolder {
public void swapBuffers() throws GLException;
/** Fetches the {@link GLCapabilitiesImmutable} corresponding to the chosen
- OpenGL capabilities (pixel format / visual / GLProfile) for this drawable.<br>
+ OpenGL capabilities (pixel format / visual / GLProfile) for this drawable.
+ <p>
+ This query only returns the chosen capabilities if {@link #isRealized()}.
+ </p>
+ <p>
On some platforms, the pixel format is not directly associated
with the drawable; a best attempt is made to return a reasonable
- value in this case. <br>
+ value in this case.
+ </p>
+ <p>
This object shall be directly associated to the attached {@link NativeSurface}'s
{@link AbstractGraphicsConfiguration}, and if changes are necessary,
they should reflect those as well.
+ </p>
@return The immutable queried instance.
+ @see #getRequestedGLCapabilities()
*/
public GLCapabilitiesImmutable getChosenGLCapabilities();
+ /** Fetches the {@link GLCapabilitiesImmutable} corresponding to the user requested
+ OpenGL capabilities (pixel format / visual / GLProfile) for this drawable.
+ <p>
+ If {@link #isRealized() realized}, {@link #getChosenGLCapabilities() the chosen capabilities}
+ reflect the actual selected OpenGL capabilities.
+ </p>
+ @return The immutable queried instance.
+ @see #getChosenGLCapabilities()
+ */
+ public GLCapabilitiesImmutable getRequestedGLCapabilities();
+
/** Fetches the {@link GLProfile} for this drawable.
Returns the GLProfile object, no copy.
*/