summaryrefslogtreecommitdiffstats
path: root/src/demos
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2010-03-30 05:12:50 +0200
committerSven Gothel <[email protected]>2010-03-30 05:12:50 +0200
commit69f64249e908851fda06ba6e6c2c4c45b837c16f (patch)
tree969705f7714b6d477301ec80ac34d2967d058d81 /src/demos
parent2e4835c543d32791cf3c79907aecad7c4692f457 (diff)
Adaptions to jogl:1a2a54a83a9adb95b4bfe9c337751acbef0cb0d3 gluegen:7220416bcef3140883d3966d921442feae3107c4 ; Fix build.xml: using rootrel.build
Diffstat (limited to 'src/demos')
-rwxr-xr-xsrc/demos/es2/RedSquare.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/demos/es2/RedSquare.java b/src/demos/es2/RedSquare.java
index 59dec30..2099fd0 100755
--- a/src/demos/es2/RedSquare.java
+++ b/src/demos/es2/RedSquare.java
@@ -197,6 +197,7 @@ public class RedSquare extends Thread implements WindowListener, KeyListener, Mo
System.err.println(Thread.currentThread()+" GL_EXTENSIONS:");
System.err.println(Thread.currentThread()+" " + gl.glGetString(gl.GL_EXTENSIONS));
System.err.println(Thread.currentThread()+" swapInterval: " + swapInterval + " (GL: "+gl.getSwapInterval()+")");
+ System.err.println(Thread.currentThread()+" isShaderCompilerAvailable: " + ShaderUtil.isShaderCompilerAvailable(gl));
if(debuggl) {
try {
@@ -257,6 +258,8 @@ public class RedSquare extends Thread implements WindowListener, KeyListener, Mo
}
public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) {
+ if(null==st) return;
+
GL2ES2 gl = drawable.getGL().getGL2ES2();
st.glUseProgram(gl, true);
@@ -277,6 +280,8 @@ public class RedSquare extends Thread implements WindowListener, KeyListener, Mo
}
public void dispose(GLAutoDrawable drawable) {
+ if(null==st) return;
+
GL2ES2 gl = drawable.getGL().getGL2ES2();
System.out.println(Thread.currentThread()+" RedSquare.dispose: "+gl.getContext());
@@ -288,6 +293,8 @@ public class RedSquare extends Thread implements WindowListener, KeyListener, Mo
}
public void display(GLAutoDrawable drawable) {
+ if(null==st) return;
+
GL2ES2 gl = drawable.getGL().getGL2ES2();
st.glUseProgram(gl, true);