Package javax.media.opengl

Examples of javax.media.opengl.DebugGL2


    @Override
    public void init(GLAutoDrawable drawable) {

        if(clContext == null) {
            // enable GL error checking using the composable pipeline
            drawable.setGL(new DebugGL2(drawable.getGL().getGL2()));

            drawable.getGL().glFinish();
            initCL(drawable.getContext());

            GL2 gl = drawable.getGL().getGL2();
View Full Code Here


            // create OpenCL context before creating any OpenGL objects
            // you want to share with OpenCL (AMD driver requirement)
            clContext = CLGLContext.create(drawable.getContext(), device);

            // enable GL error checking using the composable pipeline
            drawable.setGL(new DebugGL2(drawable.getGL().getGL2()));

            // OpenGL initialization
            GL2 gl = drawable.getGL().getGL2();

            gl.setSwapInterval(1);
View Full Code Here

            switch (mode) {
                case Release:
                    gl = releaseGL;
                    break;
                case Debug:
                    gl = new DebugGL2(releaseGL);
                    break;
                case Trace:
                    gl = new TraceGL2(releaseGL, System.out);
                    break;
            }
View Full Code Here

  protected void debug(GLAutoDrawable drawable) {
    // Install debugging and tracing in the GL pipeline
    if(trace) {
      if(debugGL) {
        if(!(drawable.getContext().getGL() instanceof TraceGL)) {
          drawable.getContext().setGL(new TraceGL(new DebugGL2((GL2)drawable.getContext().getGL()), traceLevel));
        }
        if(!(drawable.getGL() instanceof TraceGL)) {
          drawable.setGL(new TraceGL(new DebugGL2((GL2)drawable.getGL()), traceLevel));
        }
       
      } else {
        if(!(drawable.getContext().getGL() instanceof TraceGL)) {
          drawable.getContext().setGL(new TraceGL((GL2)drawable.getContext().getGL(), traceLevel));
        }
        if(!(drawable.getGL() instanceof TraceGL)) {
          drawable.setGL(new TraceGL((GL2)drawable.getGL(), traceLevel));
        }
      }
    } else if(debugGL) {
      if(!(drawable.getContext().getGL() instanceof DebugGL2)) {
        drawable.getContext().setGL(new DebugGL2((GL2)drawable.getContext().getGL()));
      }
      if(!(drawable.getGL() instanceof DebugGL2)) {
        drawable.setGL(new DebugGL2((GL2)drawable.getGL()));
      }
    }
  }
View Full Code Here

TOP

Related Classes of javax.media.opengl.DebugGL2

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.