summaryrefslogtreecommitdiffstats
path: root/src/net/java
diff options
context:
space:
mode:
authorKenneth Russel <[email protected]>2005-05-19 03:26:21 +0000
committerKenneth Russel <[email protected]>2005-05-19 03:26:21 +0000
commit8211fd2c3d4a349940baf32b32bb988079ffae64 (patch)
tree70dd170bd08da5be1a6d09653f2093f084a08706 /src/net/java
parentaef0fdb48c0ea9b8ab4430f381a1eb0dc62cfba2 (diff)
Added floating-point pbuffer support on X11
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@274 232f8b59-042b-4e1e-8c03-345bb8c30851
Diffstat (limited to 'src/net/java')
-rw-r--r--src/net/java/games/jogl/impl/x11/X11PbufferGLContext.java13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/net/java/games/jogl/impl/x11/X11PbufferGLContext.java b/src/net/java/games/jogl/impl/x11/X11PbufferGLContext.java
index 5b6df1843..fcc03aa68 100644
--- a/src/net/java/games/jogl/impl/x11/X11PbufferGLContext.java
+++ b/src/net/java/games/jogl/impl/x11/X11PbufferGLContext.java
@@ -60,10 +60,6 @@ public class X11PbufferGLContext extends X11GLContext {
private static final int MAX_PFORMATS = 256;
private static final int MAX_ATTRIBS = 256;
- // FIXME: figure out how to support render-to-texture and
- // render-to-texture-rectangle (which appear to be supported, though
- // it looks like floating-point buffers are not)
-
public X11PbufferGLContext(GLCapabilities capabilities, int initialWidth, int initialHeight) {
super(null, capabilities, null, null);
this.initWidth = initialWidth;
@@ -103,10 +99,6 @@ public class X11PbufferGLContext extends X11GLContext {
throw new GLException("Null parentContext");
}
- if (capabilities.getOffscreenFloatingPointBuffers()) {
- throw new GLException("Floating-point pbuffers not supported yet on X11");
- }
-
if (capabilities.getOffscreenRenderToTexture()) {
throw new GLException("Render-to-texture pbuffers not supported yet on X11");
}
@@ -166,6 +158,11 @@ public class X11PbufferGLContext extends X11GLContext {
iattributes[niattribs++] = capabilities.getAccumBlueBits();
}
+ if (capabilities.getOffscreenFloatingPointBuffers()) {
+ iattributes[niattribs++] = GLX.GLX_FLOAT_COMPONENTS_NV;
+ iattributes[niattribs++] = GL.GL_TRUE;
+ }
+
// FIXME: add FSAA support? Don't want to get into a situation
// where we have to retry the glXChooseFBConfig call if it fails
// due to a lack of an antialiased visual...