aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2009-08-06 11:56:16 -0700
committerSven Gothel <[email protected]>2009-08-06 11:56:16 -0700
commit6e70527c8408630c6779b72497063414754eac26 (patch)
tree3e5f675a904ba1f4478219bc9bbe12253e0594d3 /src
parentbce5061cd529e43437bc545e41d653217fa540d6 (diff)
parent6b0a0906617ddc5ccbbfe5b1eafb03be2e730a3d (diff)
Merge branch 'master' into MIPS_PORTMIPS_PORT
Diffstat (limited to 'src')
-rw-r--r--src/jogl/classes/com/sun/opengl/impl/windows/wgl/WindowsPbufferWGLDrawable.java8
-rw-r--r--src/jogl/classes/com/sun/opengl/impl/x11/glx/X11GLXGraphicsConfiguration.java2
-rw-r--r--src/jogl/classes/com/sun/opengl/impl/x11/glx/X11GLXGraphicsConfigurationFactory.java21
3 files changed, 18 insertions, 13 deletions
diff --git a/src/jogl/classes/com/sun/opengl/impl/windows/wgl/WindowsPbufferWGLDrawable.java b/src/jogl/classes/com/sun/opengl/impl/windows/wgl/WindowsPbufferWGLDrawable.java
index 79dda9049..20a891414 100644
--- a/src/jogl/classes/com/sun/opengl/impl/windows/wgl/WindowsPbufferWGLDrawable.java
+++ b/src/jogl/classes/com/sun/opengl/impl/windows/wgl/WindowsPbufferWGLDrawable.java
@@ -290,10 +290,12 @@ public class WindowsPbufferWGLDrawable extends WindowsWGLDrawable {
GLCapabilities newCaps = WindowsWGLGraphicsConfiguration.AttribList2GLCapabilities(glProfile, iattributes, niattribs, ivalues, true, false, true);
PIXELFORMATDESCRIPTOR pfd = WindowsWGLGraphicsConfiguration.createPixelFormatDescriptor();
if (WGL.DescribePixelFormat(parentHdc, pformats[whichFormat], pfd.size(), pfd) == 0) {
- throw new GLException("Unable to describe pixel format " + pformats[whichFormat]);
+ if (DEBUG) {
+ System.err.println("Unable to describe pixel format (Continue: true) " + whichFormat + "/" + nformats + " pfdID " + pformats[whichFormat]+":\n\t"+newCaps);
+ }
}
if(newCaps.isOnscreen()) {
- throw new GLException("Error: Selected Onscreen Caps for PBuffer: "+newCaps);
+ throw new GLException("Error: Selected Onscreen Caps for PBuffer: "+newCaps+"\n\t"+newCaps);
}
config.setCapsPFD(newCaps, pfd, pformats[whichFormat], true);
} else {
@@ -303,7 +305,7 @@ public class WindowsPbufferWGLDrawable extends WindowsWGLDrawable {
}
GLCapabilities newCaps = WindowsWGLGraphicsConfiguration.PFD2GLCapabilities(glProfile, pfd, false, true);
if(newCaps.isOnscreen()) {
- throw new GLException("Error: Selected Onscreen Caps for PBuffer: "+newCaps);
+ throw new GLException("Error: Selected Onscreen Caps for PBuffer: "+newCaps+"\n\t"+newCaps);
}
config.setCapsPFD(newCaps, pfd, pformats[whichFormat], false);
}
diff --git a/src/jogl/classes/com/sun/opengl/impl/x11/glx/X11GLXGraphicsConfiguration.java b/src/jogl/classes/com/sun/opengl/impl/x11/glx/X11GLXGraphicsConfiguration.java
index 4cd174bec..dbf69e865 100644
--- a/src/jogl/classes/com/sun/opengl/impl/x11/glx/X11GLXGraphicsConfiguration.java
+++ b/src/jogl/classes/com/sun/opengl/impl/x11/glx/X11GLXGraphicsConfiguration.java
@@ -198,7 +198,7 @@ public class X11GLXGraphicsConfiguration extends X11GraphicsConfiguration implem
String glXExtensions = GLX.glXQueryExtensionsString(display, screen);
if (glXExtensions == null ||
glXExtensions.indexOf("GLX_NV_float_buffer") < 0) {
- throw new GLException("Floating-point pbuffers on X11 currently require NVidia hardware");
+ throw new GLException("Floating-point pbuffers on X11 currently require NVidia hardware: "+glXExtensions);
}
res[idx++] = GLXExt.GLX_FLOAT_COMPONENTS_NV;
res[idx++] = GL.GL_TRUE;
diff --git a/src/jogl/classes/com/sun/opengl/impl/x11/glx/X11GLXGraphicsConfigurationFactory.java b/src/jogl/classes/com/sun/opengl/impl/x11/glx/X11GLXGraphicsConfigurationFactory.java
index 49b56ea0e..074fbda5f 100644
--- a/src/jogl/classes/com/sun/opengl/impl/x11/glx/X11GLXGraphicsConfigurationFactory.java
+++ b/src/jogl/classes/com/sun/opengl/impl/x11/glx/X11GLXGraphicsConfigurationFactory.java
@@ -89,7 +89,7 @@ public class X11GLXGraphicsConfigurationFactory extends GraphicsConfigurationFac
xvis = X11GLXGraphicsConfiguration.XVisualID2XVisualInfo(display, visID);
caps = X11GLXGraphicsConfiguration.XVisualInfo2GLCapabilities(glProfile, display, xvis, onscreen, usePBuffer, isMultisampleAvailable);
- int[] attribs = X11GLXGraphicsConfiguration.GLCapabilities2AttribList(caps, true, isMultisampleAvailable, 0, 0);
+ int[] attribs = X11GLXGraphicsConfiguration.GLCapabilities2AttribList(caps, true, isMultisampleAvailable, display, screen);
int[] count = { -1 };
PointerBuffer fbcfgsL = GLX.glXChooseFBConfigCopied(display, screen, attribs, 0, count, 0);
if (fbcfgsL == null || fbcfgsL.limit()<1) {
@@ -186,19 +186,19 @@ public class X11GLXGraphicsConfigurationFactory extends GraphicsConfigurationFac
AbstractGraphicsDevice absDevice = x11Screen.getDevice();
long display = absDevice.getHandle();
boolean isMultisampleAvailable = GLXUtil.isMultisampleAvailable(display);
- int[] attribs = X11GLXGraphicsConfiguration.GLCapabilities2AttribList(capabilities, true, isMultisampleAvailable, 0, 0);
+ int[] attribs = X11GLXGraphicsConfiguration.GLCapabilities2AttribList(capabilities, true, isMultisampleAvailable, display, screen);
int[] count = { -1 };
fbcfgsL = GLX.glXChooseFBConfigCopied(display, screen, attribs, 0, count, 0);
if (fbcfgsL == null || fbcfgsL.limit()<1) {
if(DEBUG) {
- System.err.println("X11GLXGraphicsConfiguration.chooseGraphicsConfigurationFBConfig: glXChooseFBConfig ("+x11Screen+","+capabilities+"): "+fbcfgsL+", "+count[0]);
+ System.err.println("X11GLXGraphicsConfiguration.chooseGraphicsConfigurationFBConfig: Failed glXChooseFBConfig ("+x11Screen+","+capabilities+"): "+fbcfgsL+", "+count[0]);
}
return null;
}
if( !X11GLXGraphicsConfiguration.GLXFBConfigValid( display, fbcfgsL.get(0) ) ) {
if(DEBUG) {
- System.err.println("X11GLXGraphicsConfiguration.chooseGraphicsConfigurationFBConfig: GLX FBConfig invalid: ("+x11Screen+","+capabilities+"): "+fbcfgsL+", fbcfg: 0x"+Long.toHexString(fbcfgsL.get(0)));
+ System.err.println("X11GLXGraphicsConfiguration.chooseGraphicsConfigurationFBConfig: Failed - GLX FBConfig invalid: ("+x11Screen+","+capabilities+"): "+fbcfgsL+", fbcfg: 0x"+Long.toHexString(fbcfgsL.get(0)));
}
return null;
}
@@ -224,7 +224,7 @@ public class X11GLXGraphicsConfigurationFactory extends GraphicsConfigurationFac
if (chosen < 0) {
// keep on going ..
if(DEBUG) {
- System.err.println("X11GLXGraphicsConfiguration.chooseGraphicsConfigurationFBConfig .. unable to choose config, using first");
+ System.err.println("X11GLXGraphicsConfiguration.chooseGraphicsConfigurationFBConfig Failed .. unable to choose config, using first");
}
chosen = 0; // default ..
} else if (chosen >= caps.length) {
@@ -236,9 +236,12 @@ public class X11GLXGraphicsConfigurationFactory extends GraphicsConfigurationFac
retXVisualInfo = GLX.glXGetVisualFromFBConfigCopied(display, fbcfgsL.get(chosen));
if (retXVisualInfo==null) {
if(DEBUG) {
- System.err.println("X11GLXGraphicsConfiguration.chooseGraphicsConfigurationFBConfig: glXGetVisualFromFBConfig ("+x11Screen+", "+fbcfgsL.get(chosen) +": "+fbcfgsL);
+ System.err.println("X11GLXGraphicsConfiguration.chooseGraphicsConfigurationFBConfig: Failed glXGetVisualFromFBConfig ("+x11Screen+", "+fbcfgsL.get(chosen) +" (Continue: "+(false==caps[chosen].isOnscreen())+"):\n\t"+caps[chosen]);
+ }
+ if(caps[chosen].isOnscreen()) {
+ // Onscreen drawables shall have a XVisual ..
+ return null;
}
- return null;
}
} finally {
NativeWindowFactory.getDefaultFactory().getToolkitLock().unlock();
@@ -271,7 +274,7 @@ public class X11GLXGraphicsConfigurationFactory extends GraphicsConfigurationFac
AbstractGraphicsDevice absDevice = x11Screen.getDevice();
long display = absDevice.getHandle();
boolean isMultisampleAvailable = GLXUtil.isMultisampleAvailable(display);
- int[] attribs = X11GLXGraphicsConfiguration.GLCapabilities2AttribList(capabilities, false, isMultisampleAvailable, 0, 0);
+ int[] attribs = X11GLXGraphicsConfiguration.GLCapabilities2AttribList(capabilities, false, isMultisampleAvailable, display, screen);
XVisualInfo[] infos = null;
XVisualInfo recommendedVis = GLX.glXChooseVisualCopied(display, screen, attribs, 0);
@@ -309,7 +312,7 @@ public class X11GLXGraphicsConfigurationFactory extends GraphicsConfigurationFac
if (chosen < 0) {
// keep on going ..
if(DEBUG) {
- System.err.println("X11GLXGraphicsConfiguration.chooseGraphicsConfigurationXVisual .. unable to choose config, using first");
+ System.err.println("X11GLXGraphicsConfiguration.chooseGraphicsConfigurationXVisual Failed .. unable to choose config, using first");
}
chosen = 0; // default ..
} else if (chosen >= caps.length) {