diff options
author | Kenneth Russel <[email protected]> | 2003-07-15 22:32:06 +0000 |
---|---|---|
committer | Kenneth Russel <[email protected]> | 2003-07-15 22:32:06 +0000 |
commit | beaca5fa8a64e8b7c5e9452fa9828eb9a217bd2e (patch) | |
tree | b9b6ac76a155de85f6b2d2ab0b29686c55ec510d /src/demos/vertexProgWarp/VertexProgWarp.java | |
parent | ecb910404a7ba50afa71b3bf18689dc80d8008a5 (diff) |
Fixed bug in Animator where it would hang upon stopping if exception
was thrown during init(). Fixed build.xml files to get javac to
produce source file and line number information. Fixed demos to pop up
a dialog box if an extension they need is unsupported.
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/../svn-server-sync/jogl-demos/trunk@12 3298f667-5e0e-4b4a-8ed4-a3559d26a5f4
Diffstat (limited to 'src/demos/vertexProgWarp/VertexProgWarp.java')
-rw-r--r-- | src/demos/vertexProgWarp/VertexProgWarp.java | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/demos/vertexProgWarp/VertexProgWarp.java b/src/demos/vertexProgWarp/VertexProgWarp.java index 6a6a592..c4a88bb 100644 --- a/src/demos/vertexProgWarp/VertexProgWarp.java +++ b/src/demos/vertexProgWarp/VertexProgWarp.java @@ -131,7 +131,7 @@ public class VertexProgWarp { try { initExtension(gl, "GL_ARB_vertex_program"); } catch (RuntimeException e) { - runExit(); + quit = true; throw(e); } @@ -268,7 +268,14 @@ public class VertexProgWarp { // private void initExtension(GL gl, String glExtensionName) { if (!gl.isExtensionAvailable(glExtensionName)) { - throw new RuntimeException("OpenGL extension \"" + glExtensionName + "\" not available"); + final String message = "OpenGL extension \"" + glExtensionName + "\" not available"; + new Thread(new Runnable() { + public void run() { + JOptionPane.showMessageDialog(null, message, "Unavailable extension", JOptionPane.ERROR_MESSAGE); + runExit(); + } + }).start(); + throw new RuntimeException(message); } } |