Examples of GLCanvas


Examples of javax.media.opengl.GLCanvas

    public GraphCanvas() {
        super();
        formatter = NumberFormat.getNumberInstance();
        formatter.setMaximumFractionDigits(1);
        glCanvas = new GLCanvas(getCaps());
        super.initDrawable(glCanvas);
        glCanvas.setMinimumSize(new Dimension(0, 0));   //Fix Canvas resize Issue

        //Basic init
        graphComponent = (Component) glCanvas;
View Full Code Here

Examples of javax.media.opengl.GLCanvas

    glCaps.setAlphaBits(8);

    /* Cria um canvas, adiciona ao frame e objeto "ouvinte"
     * para os eventos Gl, de mouse e teclado
     */
    GLCanvas canvas = new GLCanvas(glCaps);
    add(canvas,BorderLayout.CENTER);
    canvas.addGLEventListener(renderer);       
    canvas.addKeyListener(renderer);
    //canvas.addMouseMotionListener(renderer);
    //canvas.addMouseListener(renderer);
    canvas.requestFocus();     
  }   
View Full Code Here

Examples of javax.media.opengl.GLCanvas

    /* Cria um canvas, adiciona ao frame e objeto "ouvinte"
     * para os eventos Gl, de mouse e teclado
     */
   
    GLCanvas canvas = new GLCanvas(glCaps);
    add(canvas,BorderLayout.CENTER);
    canvas.addGLEventListener(renderer);       
    canvas.addKeyListener(renderer);
    canvas.addMouseMotionListener(renderer);
    canvas.addMouseListener(renderer);
    canvas.requestFocus();
  }   
View Full Code Here

Examples of javax.media.opengl.GLCanvas

     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {
        JLabel label = new JLabel();
        canvas = new GLCanvas(createGLCapabilites());

        setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);

        label.setText("Below you see a GLCanvas");

View Full Code Here

Examples of javax.media.opengl.GLCanvas

            
        return new GLDisplay( title, width, hight);
    }

    private GLDisplay( String title, int width, int height) {
        glCanvas = new GLCanvas(new GLCapabilities());
        glCanvas.setSize( width-100, height-100 );
        glCanvas.setIgnoreRepaint( true );
        glCanvas.addGLEventListener( helpOverlayGLEventListener );

        frame = new JFrame( title );
View Full Code Here

Examples of javax.media.opengl.GLCanvas

   
    // get data
    adt obj = (adt)of.obj;

    // 3D Init
    GLCanvas glScene = null;
    Tutorial2 glEvents = null;
   
    JPanel r = new JPanel(new BorderLayout());
    r.add(new JLabel ("To be written."));
   
    // handle events
    glScene = new GLCanvas();
    for(Plugin p : pp) {
      if(p.getClass().toString().endsWith("mpqFileRequest"))
        glEvents = new Tutorial2(obj, fm, p);
    }
   
    glScene.addGLEventListener(glEvents);
   
    r.addKeyListener(glEvents);
    r.addMouseListener(glEvents);
    glScene.addKeyListener(glEvents);
    glScene.addMouseListener(glEvents);
   
    r.add(glScene, BorderLayout.CENTER);

    return r;
  }
View Full Code Here

Examples of javax.media.opengl.GLCanvas

      int x = (int)(d.getWidth()/2)-(int)(DEFAULT_WIDTH/2);     
      int y = (int)(d.getHeight()/2)-(int)(DEFAULT_HEIGHT/2);         
      setBounds(x, y, DEFAULT_WIDTH, DEFAULT_HEIGHT);
      setResizable(false);
     
    GLCanvas canvas = new GLCanvas();
    canvas.addGLEventListener(this);
    //this.add(canvas);
   
   
    /**
     * Add default close function to close button
View Full Code Here

Examples of javax.media.opengl.GLCanvas

   
    if(lightweight) {
      canvas = new GLJPanel(CAPABILITIES, null, glContext);
    } else {
      canvas = new GLCanvas(CAPABILITIES, null, glContext, null);
    }
    canvas.addGLEventListener(this);
   
    component = (Component)canvas;
    component.addComponentListener(this);
View Full Code Here

Examples of javax.media.opengl.awt.GLCanvas

        {
            WorldWindow ww = this.getWorldWindow();
            if (ww != null)
            {
                WorldWindowGLCanvas wwgl = (WorldWindowGLCanvas) ww;
                GLCanvas glc = wwgl;
                Canvas cv = glc;
                Component c = cv;
                hwnd = zebraGetWin32Handle(c);
            }
        }
View Full Code Here

Examples of javax.media.opengl.awt.GLCanvas

            GLCapabilities caps = new GLCapabilities(Configuration.getMaxCompatibleGLProfile());
            caps.setAlphaBits(8);
            caps.setRedBits(8);
            caps.setGreenBits(8);
            caps.setBlueBits(8);
            GLCanvas glCanvas = new GLCanvas(caps);
            glCanvas.addGLEventListener(this);
            this.add(glCanvas);
            this.setSize(200, 200);
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.