diff options
author | Julien Gouesse <[email protected]> | 2014-02-23 13:45:26 +0100 |
---|---|---|
committer | Julien Gouesse <[email protected]> | 2014-02-23 13:45:26 +0100 |
commit | 8e256dabec13303ab5e04fe150c9daa08c5285c1 (patch) | |
tree | 7f2f4d677ce4bd15e17ba71e0dd06e03a7810362 /ardor3d-jogl/src | |
parent | 82ccd850d23b6d615d2641671b11bc34e4d44217 (diff) |
Creates the correct debug pipeline matching with any GL instance used by the context
Diffstat (limited to 'ardor3d-jogl/src')
-rw-r--r-- | ardor3d-jogl/src/main/java/com/ardor3d/framework/jogl/JoglCanvasRenderer.java | 40 |
1 files changed, 2 insertions, 38 deletions
diff --git a/ardor3d-jogl/src/main/java/com/ardor3d/framework/jogl/JoglCanvasRenderer.java b/ardor3d-jogl/src/main/java/com/ardor3d/framework/jogl/JoglCanvasRenderer.java index 6f61422..83ff0ef 100644 --- a/ardor3d-jogl/src/main/java/com/ardor3d/framework/jogl/JoglCanvasRenderer.java +++ b/ardor3d-jogl/src/main/java/com/ardor3d/framework/jogl/JoglCanvasRenderer.java @@ -12,17 +12,11 @@ package com.ardor3d.framework.jogl; import java.util.logging.Logger; -import javax.media.opengl.DebugGL2; -import javax.media.opengl.DebugGL3; -import javax.media.opengl.DebugGL3bc; -import javax.media.opengl.DebugGL4; -import javax.media.opengl.DebugGL4bc; -import javax.media.opengl.DebugGLES1; -import javax.media.opengl.DebugGLES2; import javax.media.opengl.GL; import javax.media.opengl.GLContext; import javax.media.opengl.GLDrawableFactory; import javax.media.opengl.GLException; +import javax.media.opengl.GLPipelineFactory; import com.ardor3d.annotation.MainThread; import com.ardor3d.framework.CanvasRenderer; @@ -253,37 +247,7 @@ public class JoglCanvasRenderer implements CanvasRenderer { // Enable Debugging if requested. if (_useDebug != _debugEnabled) { - if (_context.getGL().isGLES()) { - if (_context.getGL().isGLES1()) { - _context.setGL(new DebugGLES1(_context.getGL().getGLES1())); - } else { - if (_context.getGL().isGLES2()) { - _context.setGL(new DebugGLES2(_context.getGL().getGLES2())); - } else { - // TODO ES3 - } - } - } else { - if (_context.getGL().isGL4bc()) { - _context.setGL(new DebugGL4bc(_context.getGL().getGL4bc())); - } else { - if (_context.getGL().isGL4()) { - _context.setGL(new DebugGL4(_context.getGL().getGL4())); - } else { - if (_context.getGL().isGL3bc()) { - _context.setGL(new DebugGL3bc(_context.getGL().getGL3bc())); - } else { - if (_context.getGL().isGL3()) { - _context.setGL(new DebugGL3(_context.getGL().getGL3())); - } else { - if (_context.getGL().isGL2()) { - _context.setGL(new DebugGL2(_context.getGL().getGL2())); - } - } - } - } - } - } + _context.setGL(GLPipelineFactory.create("javax.media.opengl.Debug", null, _context.getGL(), null)); _debugEnabled = true; LOGGER.info("DebugGL Enabled"); |