aboutsummaryrefslogtreecommitdiffstats
path: root/src/net/java/games/jogl/impl/x11
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/x11
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/x11')
-rw-r--r--src/net/java/games/jogl/impl/x11/X11PbufferGLContext.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/net/java/games/jogl/impl/x11/X11PbufferGLContext.java b/src/net/java/games/jogl/impl/x11/X11PbufferGLContext.java
index fcc03aa68..ba3b60845 100644
--- a/src/net/java/games/jogl/impl/x11/X11PbufferGLContext.java
+++ b/src/net/java/games/jogl/impl/x11/X11PbufferGLContext.java
@@ -159,6 +159,9 @@ public class X11PbufferGLContext extends X11GLContext {
}
if (capabilities.getOffscreenFloatingPointBuffers()) {
+ if (!gl.isExtensionAvailable("GLX_NV_float_buffer")) {
+ throw new GLException("Floating-point pbuffers on X11 currently require NVidia hardware");
+ }
iattributes[niattribs++] = GLX.GLX_FLOAT_COMPONENTS_NV;
iattributes[niattribs++] = GL.GL_TRUE;
}
@@ -329,6 +332,11 @@ public class X11PbufferGLContext extends X11GLContext {
// FIXME: do we need to do anything if the pbuffer is double-buffered?
}
+ public int getFloatingPointMode() {
+ // Floating-point pbuffers currently require NVidia hardware on X11
+ return GLPbuffer.NV_FLOAT;
+ }
+
private int queryFBConfig(long display, GLXFBConfig fbConfig, int attrib) {
int[] tmp = new int[1];
if (GLX.glXGetFBConfigAttrib(display, fbConfig, attrib, tmp) != 0) {