aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/com/sun/opengl/impl/GLPbufferImpl.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2009-10-02 16:06:02 -0700
committerSven Gothel <[email protected]>2009-10-02 16:06:02 -0700
commitd3a4046f5c45b8ef6e6f70115fcf6250e09a8732 (patch)
tree83154adb9680528bc92db7ce609a8f8b9b686e4f /src/jogl/classes/com/sun/opengl/impl/GLPbufferImpl.java
parent8fb68690f20eece763561f6f0038a007e934a1dc (diff)
Pbuffer GLDrawableFactory integration (2)
Diffstat (limited to 'src/jogl/classes/com/sun/opengl/impl/GLPbufferImpl.java')
-rw-r--r--src/jogl/classes/com/sun/opengl/impl/GLPbufferImpl.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/jogl/classes/com/sun/opengl/impl/GLPbufferImpl.java b/src/jogl/classes/com/sun/opengl/impl/GLPbufferImpl.java
index 8aba26fc6..966b1e63e 100644
--- a/src/jogl/classes/com/sun/opengl/impl/GLPbufferImpl.java
+++ b/src/jogl/classes/com/sun/opengl/impl/GLPbufferImpl.java
@@ -62,6 +62,18 @@ public class GLPbufferImpl implements GLPbuffer {
public GLPbufferImpl(GLDrawableImpl pbufferDrawable,
GLContext parentContext) {
+ GLCapabilities caps = (GLCapabilities)
+ pbufferDrawable.getNativeWindow().getGraphicsConfiguration().getNativeGraphicsConfiguration().getChosenCapabilities();
+ if(caps.isOnscreen()) {
+ if(caps.isPBuffer()) {
+ throw new IllegalArgumentException("Error: Given drawable is Onscreen and Pbuffer: "+pbufferDrawable);
+ }
+ throw new IllegalArgumentException("Error: Given drawable is Onscreen: "+pbufferDrawable);
+ } else {
+ if(!caps.isPBuffer()) {
+ throw new IllegalArgumentException("Error: Given drawable is not Pbuffer: "+pbufferDrawable);
+ }
+ }
this.pbufferDrawable = pbufferDrawable;
context = (GLContextImpl) pbufferDrawable.createContext(parentContext);
context.setSynchronized(true);