mirror of https://github.com/rusefi/jzy3d-api.git
cleaner code
This commit is contained in:
parent
ec163c2f09
commit
f1c2dc433a
|
@ -7,6 +7,7 @@ import org.jzy3d.plot3d.rendering.canvas.ICanvas;
|
|||
import org.jzy3d.plot3d.rendering.scene.Scene;
|
||||
import com.jogamp.opengl.GL;
|
||||
import com.jogamp.opengl.GLAutoDrawable;
|
||||
import com.jogamp.opengl.GLContext;
|
||||
import com.jogamp.opengl.GLEventListener;
|
||||
import com.jogamp.opengl.GLPipelineFactory;
|
||||
import com.jogamp.opengl.util.GLReadBufferUtil;
|
||||
|
@ -66,12 +67,12 @@ public class Renderer3d implements GLEventListener {
|
|||
public void init(GLAutoDrawable canvas) {
|
||||
if (canvas != null && canvas.getGL() != null && view != null) {
|
||||
|
||||
GLContext context = canvas.getGL().getContext();
|
||||
|
||||
if (debugGL)
|
||||
canvas.getGL().getContext()
|
||||
.setGL(GLPipelineFactory.create("com.jogamp.opengl.Debug", null, canvas.getGL(), null));
|
||||
context.setGL(GLPipelineFactory.create("com.jogamp.opengl.Debug", null, canvas.getGL(), null));
|
||||
if (traceGL)
|
||||
canvas.getGL().getContext().setGL(GLPipelineFactory.create("com.jogamp.opengl.Trace", null,
|
||||
canvas.getGL(), new Object[] {System.err}));
|
||||
context.setGL(GLPipelineFactory.create("com.jogamp.opengl.Trace", null, canvas.getGL(), new Object[] {System.err}));
|
||||
|
||||
updatePainterWithGL(canvas);
|
||||
|
||||
|
|
Loading…
Reference in New Issue