diff options
author | Sven Gothel <[email protected]> | 2011-12-17 21:41:30 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2011-12-17 21:41:30 +0100 |
commit | 47dc069104723f3d2e8d9ebdd700182e067163d0 (patch) | |
tree | 538c9abdcf3861b0d4f067633f733c26b882c003 /src/jogl/classes/jogamp/opengl/x11/glx | |
parent | 5ebb4c2704711b4387f263484a5b820edffadf0a (diff) |
GLDrawableFactory*.createOffscreenDrawable(): No implicit setRealized(true) @ creation
GLDrawableFactory*.createOffscreenDrawable():
No implicit setRealized(true) @ creation, following deferred creation like onscreen drawables.
This allows using offscreen drawables in classes like GLCanvas, where realization is deferred due to pending valid size.
Only createGLPBuffer() realizes the offscreen pbuffer drawable immediatly to reduce the impact
on user-code.
GLDrawableFactoryImpl.createGLDrawable():
- Simplify OffscreenLayerSurface validation and check it first regardless of the chosenCaps
to get a chance to use pbuffer.
Diffstat (limited to 'src/jogl/classes/jogamp/opengl/x11/glx')
-rw-r--r-- | src/jogl/classes/jogamp/opengl/x11/glx/X11PbufferGLXDrawable.java | 10 | ||||
-rw-r--r-- | src/jogl/classes/jogamp/opengl/x11/glx/X11PixmapGLXDrawable.java | 1 |
2 files changed, 4 insertions, 7 deletions
diff --git a/src/jogl/classes/jogamp/opengl/x11/glx/X11PbufferGLXDrawable.java b/src/jogl/classes/jogamp/opengl/x11/glx/X11PbufferGLXDrawable.java index 1bbeece6d..da7b535cb 100644 --- a/src/jogl/classes/jogamp/opengl/x11/glx/X11PbufferGLXDrawable.java +++ b/src/jogl/classes/jogamp/opengl/x11/glx/X11PbufferGLXDrawable.java @@ -49,12 +49,6 @@ public class X11PbufferGLXDrawable extends X11GLXDrawable { GLCapabilitiesChooser chooser, int width, int height */ super(factory, target, false); - - setRealized(true); - - if (DEBUG) { - System.err.println("Created pbuffer " + this); - } } protected void destroyImpl() { @@ -133,6 +127,10 @@ public class X11PbufferGLXDrawable extends X11GLXDrawable { GLX.glXQueryDrawable(display, pbuffer, GLX.GLX_HEIGHT, tmp, 0); int height = tmp[0]; ((SurfaceChangeable)ns).surfaceSizeChanged(width, height); + + if (DEBUG) { + System.err.println("Created pbuffer " + this); + } } public int getFloatingPointMode() { diff --git a/src/jogl/classes/jogamp/opengl/x11/glx/X11PixmapGLXDrawable.java b/src/jogl/classes/jogamp/opengl/x11/glx/X11PixmapGLXDrawable.java index 82ad31aad..7dae20f80 100644 --- a/src/jogl/classes/jogamp/opengl/x11/glx/X11PixmapGLXDrawable.java +++ b/src/jogl/classes/jogamp/opengl/x11/glx/X11PixmapGLXDrawable.java @@ -49,7 +49,6 @@ public class X11PixmapGLXDrawable extends X11GLXDrawable { protected X11PixmapGLXDrawable(GLDrawableFactory factory, NativeSurface target) { super(factory, target, false); - setRealized(true); } protected void destroyImpl() { |