aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/javax/media/opengl/awt
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2010-12-03 21:32:16 +0100
committerSven Gothel <[email protected]>2010-12-03 21:32:16 +0100
commit4b9ad2508ff31a03d3bc4482d812a6cbc0c5c33b (patch)
tree28212ee090a08c3fae1943a26e6ac4633ecc5090 /src/jogl/classes/javax/media/opengl/awt
parentde9211df2c1654db889bb5d5c43297ed7d6499ba (diff)
Cleanup GLDrawableFactory API and platform Implementations
- Finish API change using the AbstractGraphicsDevice, which denotes the target device for the desired NativeSurface / GLDrawable. The AbstractGraphicsDevice argument may be null to reflect the platform's default device. Clarified API documentation. This move is necessary to make the API coherent. - createOffscreenDrawable(..) may create a Pbuffer drawable if caps and supported. This unifies the functionality with createGLDrawable(..). Further more, a Pbuffer drawable is an offscreen as well. - added createOffscreenSurface(..) following the same behavior as createOffscreenDrawable(..), this is a convenient native offscreen surface factory entry. - removed createGLPbufferDrawable(..), use createOffscreenDrawable(..), since it is redundant! Implementation Details: - EGLDrawableFactory holds a shared native EGLGraphicsDevice, being used by the offscreen EGL drawable (no more multiple creation).
Diffstat (limited to 'src/jogl/classes/javax/media/opengl/awt')
-rw-r--r--src/jogl/classes/javax/media/opengl/awt/GLJPanel.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java b/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java
index 5c6be8bc4..c8bfe94d8 100644
--- a/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java
+++ b/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java
@@ -966,6 +966,7 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable {
public void initialize() {
// Fall-through path: create an offscreen context instead
offscreenDrawable = (GLDrawableImpl) factory.createOffscreenDrawable(
+ null /* default platform device */,
offscreenCaps,
chooser,
Math.max(1, panelWidth),
@@ -1051,7 +1052,8 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable {
throw new InternalError("Creating pbuffer twice without destroying it (memory leak / correctness bug)");
}
try {
- pbuffer = factory.createGLPbuffer(offscreenCaps,
+ pbuffer = factory.createGLPbuffer(null /* default platform device */,
+ offscreenCaps,
null,
pbufferWidth,
pbufferHeight,