aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/com/sun/opengl/impl/GLDrawableFactoryImpl.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/jogl/classes/com/sun/opengl/impl/GLDrawableFactoryImpl.java')
-rw-r--r--src/jogl/classes/com/sun/opengl/impl/GLDrawableFactoryImpl.java15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/jogl/classes/com/sun/opengl/impl/GLDrawableFactoryImpl.java b/src/jogl/classes/com/sun/opengl/impl/GLDrawableFactoryImpl.java
index a2d0e0150..9ea599b30 100644
--- a/src/jogl/classes/com/sun/opengl/impl/GLDrawableFactoryImpl.java
+++ b/src/jogl/classes/com/sun/opengl/impl/GLDrawableFactoryImpl.java
@@ -57,7 +57,7 @@ public abstract class GLDrawableFactoryImpl extends GLDrawableFactory {
//---------------------------------------------------------------------------
// Dispatching GLDrawable construction in respect to the NativeWindow Capabilities
//
- public GLDrawable createGLDrawable(NativeWindow target) {
+ public GLDrawable createGLDrawable(NativeWindow target, GLCapabilitiesChooser chooser) {
if (target == null) {
throw new IllegalArgumentException("Null target");
}
@@ -74,13 +74,13 @@ public abstract class GLDrawableFactoryImpl extends GLDrawableFactory {
if(caps.isPBuffer() && canCreateGLPbuffer()) {
// PBUFFER
result = createGLPbufferDrawable(caps,
- null /* GLCapabilitiesChooser */,
+ chooser,
target.getWidth(),
target.getHeight());
}
if(null==result) {
result = createOffscreenDrawable(caps,
- null /* GLCapabilitiesChooser */,
+ chooser,
target.getWidth(),
target.getHeight());
}
@@ -91,6 +91,10 @@ public abstract class GLDrawableFactoryImpl extends GLDrawableFactory {
return result;
}
+ public GLDrawable createGLDrawable(NativeWindow target) {
+ return createGLDrawable(target, null);
+ }
+
/** Creates a (typically hw-accelerated) Pbuffer GLDrawable. */
public abstract GLDrawableImpl createGLPbufferDrawable(GLCapabilities capabilities,
GLCapabilitiesChooser chooser,
@@ -108,6 +112,11 @@ public abstract class GLDrawableFactoryImpl extends GLDrawableFactory {
/** Creates a (typically hw-accelerated) onscreen GLDrawable. */
public abstract GLDrawableImpl createOnscreenDrawable(NativeWindow target);
+ public GLPbuffer createGLPbuffer(GLDrawable pbufferDrawable,
+ GLContext shareWith) {
+ return new GLPbufferImpl((GLDrawableImpl)pbufferDrawable, shareWith);
+ }
+
protected GLDrawableFactoryImpl() {
super();
}