Package javax.media.opengl

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


    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

    /* 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

     */
    @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

            
        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

   
    // 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

      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

   
    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

TOP

Related Classes of javax.media.opengl.GLCanvas

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.