summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenneth Russel <[email protected]>2004-04-09 23:55:53 +0000
committerKenneth Russel <[email protected]>2004-04-09 23:55:53 +0000
commit20dfe1a11592fc19e866aeab15c964d3e7545ebb (patch)
tree00b4ed4cfe23385c7e92d417c959310bea888542
parent09842f8ebe2767b73cda2ebfb7e4c475e962488d (diff)
Fixed build problems with new visual selection code
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/jogl-1-1-temp-branch@101 232f8b59-042b-4e1e-8c03-345bb8c30851
-rw-r--r--src/net/java/games/jogl/impl/x11/X11GLContext.java5
-rw-r--r--src/net/java/games/jogl/impl/x11/X11GLContextFactory.java6
-rw-r--r--src/net/java/games/jogl/impl/x11/X11OffscreenGLContext.java2
3 files changed, 5 insertions, 8 deletions
diff --git a/src/net/java/games/jogl/impl/x11/X11GLContext.java b/src/net/java/games/jogl/impl/x11/X11GLContext.java
index df633c0e4..f1de46d5a 100644
--- a/src/net/java/games/jogl/impl/x11/X11GLContext.java
+++ b/src/net/java/games/jogl/impl/x11/X11GLContext.java
@@ -263,7 +263,7 @@ public abstract class X11GLContext extends GLContext {
}
protected XVisualInfo chooseVisual() {
- if (!isOffscreen) {
+ if (!isOffscreen()) {
// The visual has already been chosen by the time we get here;
// it's specified by the GraphicsConfiguration of the
// GLCanvas. Fortunately, the JAWT supplies the visual ID for
@@ -272,7 +272,8 @@ public abstract class X11GLContext extends GLContext {
// corresponding XVisualInfo to pass into glXChooseVisual.
int[] count = new int[1];
XVisualInfo template = new XVisualInfo();
- template.visualid(visualID);
+ // FIXME: probably not 64-bit clean
+ template.visualid((int) visualID);
XVisualInfo[] infos = GLX.XGetVisualInfo(display, GLX.VisualIDMask, template, count);
if (infos == null || infos.length == 0) {
throw new GLException("Error while getting XVisualInfo for visual ID " + visualID);
diff --git a/src/net/java/games/jogl/impl/x11/X11GLContextFactory.java b/src/net/java/games/jogl/impl/x11/X11GLContextFactory.java
index 54e24f1c3..2634b7aa8 100644
--- a/src/net/java/games/jogl/impl/x11/X11GLContextFactory.java
+++ b/src/net/java/games/jogl/impl/x11/X11GLContextFactory.java
@@ -66,7 +66,7 @@ public class X11GLContextFactory extends GLContextFactory {
}
GLCapabilities[] caps = new GLCapabilities[infos.length];
for (int i = 0; i < infos.length; i++) {
- caps[i] = xvi2GLCapabilities(infos[i]);
+ caps[i] = xvi2GLCapabilities(display, infos[i]);
// Attempt to find the visual chosen by glXChooseVisual
if (recommendedVis != null && recommendedVis.visualid() == infos[i].visualid()) {
recommendedIndex = i;
@@ -76,10 +76,6 @@ public class X11GLContextFactory extends GLContextFactory {
if (chosen < 0 || chosen >= caps.length) {
throw new GLException("GLCapabilitiesChooser specified invalid index (expected 0.." + (caps.length - 1) + ")");
}
- if (DEBUG) {
- System.err.println("Chosen visual (" + chosen + "):");
- System.err.println(caps[chosen]);
- }
XVisualInfo vis = infos[chosen];
if (vis == null) {
throw new GLException("GLCapabilitiesChooser chose an invalid visual");
diff --git a/src/net/java/games/jogl/impl/x11/X11OffscreenGLContext.java b/src/net/java/games/jogl/impl/x11/X11OffscreenGLContext.java
index fb58e59fd..8c88b0225 100644
--- a/src/net/java/games/jogl/impl/x11/X11OffscreenGLContext.java
+++ b/src/net/java/games/jogl/impl/x11/X11OffscreenGLContext.java
@@ -163,7 +163,7 @@ public class X11OffscreenGLContext extends X11GLContext {
if (context == 0) {
throw new GLException("Unable to create OpenGL context");
}
- isDoubleBuffered = (glXGetConfig(vis, GLX.GLX_DOUBLEBUFFER, new int[1]) != 0);
+ isDoubleBuffered = (X11GLContextFactory.glXGetConfig(display, vis, GLX.GLX_DOUBLEBUFFER, new int[1]) != 0);
}
private void destroy() {