summaryrefslogtreecommitdiffstats
path: root/src/net/java/games/jogl/impl/GLPbufferImpl.java
diff options
context:
space:
mode:
authorKenneth Russel <[email protected]>2005-05-20 23:07:59 +0000
committerKenneth Russel <[email protected]>2005-05-20 23:07:59 +0000
commit5f51f9c91e021c1fd1202899b531541b48cc97b9 (patch)
treef1f5dac20737e9af2d13d49c7225a964e3b51218 /src/net/java/games/jogl/impl/GLPbufferImpl.java
parentbea9f9567ca5892813b308bf92eab96166248afe (diff)
Attempt to make floating-point pbuffers portable
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@277 232f8b59-042b-4e1e-8c03-345bb8c30851
Diffstat (limited to 'src/net/java/games/jogl/impl/GLPbufferImpl.java')
-rw-r--r--src/net/java/games/jogl/impl/GLPbufferImpl.java11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/net/java/games/jogl/impl/GLPbufferImpl.java b/src/net/java/games/jogl/impl/GLPbufferImpl.java
index be0f23398..9ddb8d1da 100644
--- a/src/net/java/games/jogl/impl/GLPbufferImpl.java
+++ b/src/net/java/games/jogl/impl/GLPbufferImpl.java
@@ -56,6 +56,7 @@ public class GLPbufferImpl implements GLPbuffer {
private GLContext context;
private GLDrawableHelper drawableHelper = new GLDrawableHelper();
private boolean isInitialized=false;
+ private int floatMode;
public GLPbufferImpl(GLContext context) {
this.context = context;
@@ -207,6 +208,13 @@ public class GLPbufferImpl implements GLPbuffer {
context.destroy();
}
+ public int getFloatingPointMode() {
+ if (floatMode == 0) {
+ throw new GLException("Pbuffer not initialized, or floating-point support not requested");
+ }
+ return floatMode;
+ }
+
//----------------------------------------------------------------------
// Internals only below this point
//
@@ -237,8 +245,9 @@ public class GLPbufferImpl implements GLPbuffer {
class InitAction implements Runnable {
public void run() {
- drawableHelper.init(GLPbufferImpl.this);
isInitialized=true;
+ floatMode = context.getFloatingPointMode();
+ drawableHelper.init(GLPbufferImpl.this);
}
}
private InitAction initAction = new InitAction();