diff options
author | Sven Gothel <[email protected]> | 2012-10-05 17:49:05 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2012-10-05 17:49:05 +0200 |
commit | ed7d5f2e3fc696d47b10c8d62a071643bf385588 (patch) | |
tree | ce34d7a68ab0da66a183c4dc21efb2515651569c /src/jogl/classes/jogamp/opengl/GLDrawableImpl.java | |
parent | f541f349bdb99fbb4a00f1b81c9d4a60545cdb7e (diff) |
FBO/Offscreen: Use most simple GLCapabilities for GLFBODrawableImpl's underlying dummy surface/drawable
If stencil or MSAA has been selected, the underlying dummy drawable doesn't need to have this configuration,
i.e. doesn't need to waste the resources.
- Creation of the dummy surface/drawable uses a simple GLCapabilities
- Requested FBO GLCapabilities is being passes down to the dummy drawable
- GLFBODrawableImpl ctor leaves caps untouched
- GLFBODrawableImpl.initialize(boolean realize)
- realize == true: using the requested FBO caps and setting it in the parent dummy drawable
- realize == false: restore the original caps of dummy drawable
Diffstat (limited to 'src/jogl/classes/jogamp/opengl/GLDrawableImpl.java')
-rw-r--r-- | src/jogl/classes/jogamp/opengl/GLDrawableImpl.java | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/jogl/classes/jogamp/opengl/GLDrawableImpl.java b/src/jogl/classes/jogamp/opengl/GLDrawableImpl.java index 311690f1d..13960ecdd 100644 --- a/src/jogl/classes/jogamp/opengl/GLDrawableImpl.java +++ b/src/jogl/classes/jogamp/opengl/GLDrawableImpl.java @@ -54,13 +54,15 @@ import javax.media.opengl.GLProfile; public abstract class GLDrawableImpl implements GLDrawable { protected static final boolean DEBUG = Debug.debug("GLDrawable"); - protected GLDrawableImpl(GLDrawableFactory factory, - NativeSurface comp, - boolean realized) { + protected GLDrawableImpl(GLDrawableFactory factory, NativeSurface comp, boolean realized) { + this(factory, comp, (GLCapabilitiesImmutable) comp.getGraphicsConfiguration().getRequestedCapabilities(), realized); + } + + protected GLDrawableImpl(GLDrawableFactory factory, NativeSurface comp, GLCapabilitiesImmutable requestedCapabilities, boolean realized) { this.factory = factory; this.surface = comp; this.realized = realized; - this.requestedCapabilities = (GLCapabilitiesImmutable) surface.getGraphicsConfiguration().getRequestedCapabilities(); + this.requestedCapabilities = requestedCapabilities; } /** |