Allows to enable the debug pipeline

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9908 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
jul..om 12 years ago
parent 816842d1e1
commit fc56b7dcbf
  1. 26
      engine/src/jogl/com/jme3/system/jogl/JoglAbstractDisplay.java

@ -45,6 +45,8 @@ import java.awt.GraphicsDevice;
import java.awt.GraphicsEnvironment;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.logging.Logger;
import javax.media.opengl.DebugGL4bc;
import javax.media.opengl.GL;
import javax.media.opengl.GLAutoDrawable;
import javax.media.opengl.GLCapabilities;
import javax.media.opengl.GLEventListener;
@ -118,19 +120,19 @@ public abstract class JoglAbstractDisplay extends JoglContext implements GLEvent
canvas.setIgnoreRepaint(true);
canvas.addGLEventListener(this);
if (settings.getBoolean("GraphicsDebug")) {
canvas.invoke(false, new GLRunnable() {
// N.B: it is too early to get the GL instance from the canvas
// if (false){
// trace mode
// jME already uses err stream, use out instead
// gl = new TraceGL(gl, System.out);
// }else if (false){
// debug mode
// gl = new DebugGL(gl);
// }else{
// production mode
// }
public boolean run(GLAutoDrawable glad) {
GL gl = glad.getGL();
if (gl.isGL4bc()) {
canvas.setGL(new DebugGL4bc(gl.getGL4bc()));
}
return true;
}
});
}
renderer = new JoglRenderer();
}

Loading…
Cancel
Save