diff options
author | Sven Gothel <sgothel@jausoft.com> | 2013-10-29 11:13:01 +0100 |
---|---|---|
committer | Sven Gothel <sgothel@jausoft.com> | 2013-10-29 11:13:01 +0100 |
commit | d8074fb1df1bdb63fdb97585c797c15d34695e9c (patch) | |
tree | 69a8be8d0adc8abc2d7ff7cc8b478b4146babf4a /src/jogl/classes/jogamp/opengl | |
parent | d83d54f2aaf9b8389a64fba7a8c05c495873d941 (diff) |
GLDrawableFactory: Add 'GLAutoDrawable createDummyAutoDrawable(..)' for convenience
Added:
GLAutoDrawable createDummyAutoDrawable(AbstractGraphicsDevice deviceReq, boolean createNewDevice, GLProfile glp)
Diffstat (limited to 'src/jogl/classes/jogamp/opengl')
-rw-r--r-- | src/jogl/classes/jogamp/opengl/GLDrawableFactoryImpl.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/jogl/classes/jogamp/opengl/GLDrawableFactoryImpl.java b/src/jogl/classes/jogamp/opengl/GLDrawableFactoryImpl.java index ecb9f7dd1..a9f12b17e 100644 --- a/src/jogl/classes/jogamp/opengl/GLDrawableFactoryImpl.java +++ b/src/jogl/classes/jogamp/opengl/GLDrawableFactoryImpl.java @@ -49,6 +49,7 @@ import javax.media.nativewindow.OffscreenLayerSurface; import javax.media.nativewindow.ProxySurface; import javax.media.nativewindow.MutableSurface; import javax.media.nativewindow.UpstreamSurfaceHook; +import javax.media.opengl.GLAutoDrawable; import javax.media.opengl.GLCapabilities; import javax.media.opengl.GLCapabilitiesChooser; import javax.media.opengl.GLCapabilitiesImmutable; @@ -64,6 +65,7 @@ import javax.media.opengl.GLProfile; import com.jogamp.nativewindow.MutableGraphicsConfiguration; import com.jogamp.nativewindow.DelegatedUpstreamSurfaceHookWithSurfaceSize; import com.jogamp.nativewindow.UpstreamSurfaceHookMutableSize; +import com.jogamp.opengl.GLAutoDrawableDelegate; import com.jogamp.opengl.GLRendererQuirks; @@ -326,6 +328,14 @@ public abstract class GLDrawableFactoryImpl extends GLDrawableFactory { } @Override + public final GLAutoDrawable createDummyAutoDrawable(AbstractGraphicsDevice deviceReq, boolean createNewDevice, GLProfile glp) { + final GLDrawable drawable = createDummyDrawable(deviceReq, createNewDevice, glp); + drawable.setRealized(true); + final GLAutoDrawable sharedDrawable = new GLAutoDrawableDelegate(drawable, null, null, true /*ownDevice*/, null) { }; + return sharedDrawable; + } + + @Override public final GLDrawable createOffscreenDrawable(AbstractGraphicsDevice deviceReq, GLCapabilitiesImmutable capsRequested, GLCapabilitiesChooser chooser, |