aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/com/sun/opengl/impl/windows/wgl
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2009-10-02 15:32:02 -0700
committerSven Gothel <[email protected]>2009-10-02 15:32:02 -0700
commit8fb68690f20eece763561f6f0038a007e934a1dc (patch)
tree96aeac10e4bb9215b06855295aeccd67626176bd /src/jogl/classes/com/sun/opengl/impl/windows/wgl
parent52c3caf07ad07fcb029ea584d7e5f4c5031f84c2 (diff)
Proper PBuffer drawable abstraction
Diffstat (limited to 'src/jogl/classes/com/sun/opengl/impl/windows/wgl')
-rw-r--r--src/jogl/classes/com/sun/opengl/impl/windows/wgl/WindowsWGLDrawableFactory.java30
1 files changed, 19 insertions, 11 deletions
diff --git a/src/jogl/classes/com/sun/opengl/impl/windows/wgl/WindowsWGLDrawableFactory.java b/src/jogl/classes/com/sun/opengl/impl/windows/wgl/WindowsWGLDrawableFactory.java
index 4e02dfe92..d91cc0126 100644
--- a/src/jogl/classes/com/sun/opengl/impl/windows/wgl/WindowsWGLDrawableFactory.java
+++ b/src/jogl/classes/com/sun/opengl/impl/windows/wgl/WindowsWGLDrawableFactory.java
@@ -121,11 +121,10 @@ public class WindowsWGLDrawableFactory extends GLDrawableFactoryImpl implements
return canCreateGLPbuffer;
}
- public GLPbuffer createGLPbuffer(final GLCapabilities capabilities,
+ public GLDrawableImpl createGLPbufferDrawable(final GLCapabilities capabilities,
final GLCapabilitiesChooser chooser,
final int initialWidth,
- final int initialHeight,
- final GLContext shareWith) {
+ final int initialHeight) {
if (!canCreateGLPbuffer()) {
throw new GLException("Pbuffer support not available with current graphics card");
}
@@ -143,13 +142,12 @@ public class WindowsWGLDrawableFactory extends GLDrawableFactoryImpl implements
WGLExt dummyWGLExt = dummyContext.getWGLExt();
try {
AbstractGraphicsScreen aScreen = DefaultGraphicsScreen.createDefault();
- WindowsPbufferWGLDrawable pbufferDrawable = new WindowsPbufferWGLDrawable(factory, aScreen, capabilities, chooser,
- initialWidth,
- initialHeight,
- dummyDrawable,
- dummyWGLExt);
- GLPbufferImpl pbuffer = new GLPbufferImpl(pbufferDrawable, shareWith);
- returnList.add(pbuffer);
+ GLDrawableImpl pbufferDrawable = new WindowsPbufferWGLDrawable(factory, aScreen, capabilities, chooser,
+ initialWidth,
+ initialHeight,
+ dummyDrawable,
+ dummyWGLExt);
+ returnList.add(pbufferDrawable);
dummyContext.release();
dummyContext.destroy();
dummyDrawable.destroy();
@@ -161,7 +159,17 @@ public class WindowsWGLDrawableFactory extends GLDrawableFactoryImpl implements
}
};
maybeDoSingleThreadedWorkaround(r);
- return (GLPbuffer) returnList.get(0);
+ return (GLDrawableImpl) returnList.get(0);
+ }
+
+ public GLPbuffer createGLPbuffer(final GLCapabilities capabilities,
+ final GLCapabilitiesChooser chooser,
+ final int initialWidth,
+ final int initialHeight,
+ final GLContext shareWith) {
+ GLDrawableImpl pbufferDrawable = createGLPbufferDrawable(
+ capabilities, chooser, initialWidth, initialHeight);
+ return new GLPbufferImpl(pbufferDrawable, shareWith);
}
public GLContext createExternalGLContext() {