summaryrefslogtreecommitdiffstats
path: root/src/net
diff options
context:
space:
mode:
Diffstat (limited to 'src/net')
-rw-r--r--src/net/java/games/gluegen/opengl/BuildComposablePipeline.java1
-rw-r--r--src/net/java/games/jogl/impl/windows/WindowsGLContext.java9
2 files changed, 9 insertions, 1 deletions
diff --git a/src/net/java/games/gluegen/opengl/BuildComposablePipeline.java b/src/net/java/games/gluegen/opengl/BuildComposablePipeline.java
index d3f9a4603..230add51a 100644
--- a/src/net/java/games/gluegen/opengl/BuildComposablePipeline.java
+++ b/src/net/java/games/gluegen/opengl/BuildComposablePipeline.java
@@ -473,6 +473,7 @@ public class BuildComposablePipeline
output.println("private int indent = 0;");
output.println("protected String dumpArray(Object obj)");
output.println("{");
+ output.println(" if (obj == null) return \"[null]\";");
output.println(" StringBuffer sb = new StringBuffer(\"[\");");
output.println(" int len = java.lang.reflect.Array.getLength(obj);");
output.println(" int count = Math.min(len,16);");
diff --git a/src/net/java/games/jogl/impl/windows/WindowsGLContext.java b/src/net/java/games/jogl/impl/windows/WindowsGLContext.java
index 2ff6769b9..5d53b21d8 100644
--- a/src/net/java/games/jogl/impl/windows/WindowsGLContext.java
+++ b/src/net/java/games/jogl/impl/windows/WindowsGLContext.java
@@ -270,7 +270,14 @@ public abstract class WindowsGLContext extends GLContext {
// It seems that at this point in initialization,
// glGetString(GL.GL_EXTENSIONS) is returning null, so we
// need to use wglGetExtensionsStringARB
- String availableWGLExtensions = dummyGL.wglGetExtensionsStringARB(hdc);
+ String availableWGLExtensions = "";
+ // FIXME: would like to do this operation without throwing an
+ // exception if wglGetExtensionsStringARB isn't available
+ try {
+ availableWGLExtensions = dummyGL.wglGetExtensionsStringARB(hdc);
+ } catch (GLException e) {
+ // Apparently wglGetExtensionsStringARB wasn't available; ignore
+ }
if (availableWGLExtensions.indexOf("WGL_ARB_pixel_format") >= 0) {
haveWGLChoosePixelFormatARB = true;
if (availableWGLExtensions.indexOf("WGL_ARB_multisample") >= 0) {