From 47cdcb9bc8c172c13fa430338f42e53959149b92 Mon Sep 17 00:00:00 2001 From: Kenneth Russel Date: Fri, 21 Nov 2008 02:55:12 +0000 Subject: Fixed bugs in extension query and exception reporting git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/../svn-server-sync/jogl-demos/branches/JOGL_2_SANDBOX@292 3298f667-5e0e-4b4a-8ed4-a3559d26a5f4 --- src/demos/vertexProgRefract/VertexProgRefract.java | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/demos/vertexProgRefract/VertexProgRefract.java b/src/demos/vertexProgRefract/VertexProgRefract.java index 5274aba..37f5d74 100644 --- a/src/demos/vertexProgRefract/VertexProgRefract.java +++ b/src/demos/vertexProgRefract/VertexProgRefract.java @@ -55,11 +55,8 @@ import java.awt.event.KeyEvent; import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; import java.io.IOException; -import javax.media.opengl.GL; -import javax.media.opengl.GL2; -import javax.media.opengl.GLAutoDrawable; -import javax.media.opengl.awt.AWTGLAutoDrawable; -import javax.media.opengl.awt.GLCanvas; +import javax.media.opengl.*; +import javax.media.opengl.awt.*; import javax.media.opengl.glu.GLU; import javax.media.opengl.util.Animator; import javax.media.opengl.util.BufferUtil; @@ -247,6 +244,8 @@ public class VertexProgRefract extends Demo { public void init(GLAutoDrawable drawable) { + drawable.setGL(new DebugGL2(drawable.getGL().getGL2())); + initComplete = false; GL2 gl = drawable.getGL().getGL2(); @@ -257,13 +256,13 @@ public class VertexProgRefract extends Demo { gl.glEnable(GL.GL_DEPTH_TEST); try { - initExtension(gl, "GL_vertex_program"); + initExtension(gl, "GL_ARB_vertex_program"); initExtension(gl, "GL_VERSION_1_3"); // For multitexturing support - if (!gl.isExtensionAvailable("GL_fragment_program")) { + if (!gl.isExtensionAvailable("GL_ARB_fragment_program")) { // if (gl.isExtensionAvailable("GL_NV_register_combiners")) { // useRegisterCombiners = true; // } else { - final String message = "This demo requires either the GL_fragment_program"; + final String message = "This demo requires the GL_ARB_fragment_program extension"; // + "or GL_NV_register_combiners extension"; new Thread(new Runnable() { public void run() { -- cgit v1.2.3