Examples of GLCanvas


Examples of javax.media.opengl.awt.GLCanvas

      SwingUtilities.invokeLater(new Runnable()
      {
         @Override
         public void run() {
            // Create the OpenGL rendering canvas
            GLCanvas canvas = new GfrGLCanvasPlgViewerVolShps3dAni();
            // Create a animator that drives canvas' display() at the specified FPS.
            final FPSAnimator animator = new GfrFPSAnimatorPlgViewerVolShps3dAni(canvas);
            // Create the top-level container
View Full Code Here

Examples of javax.media.opengl.awt.GLCanvas

    GLProfile profile = GLProfile.getDefault();
    GLCapabilities caps = new GLCapabilities(profile);
   
    frame = SWT_AWT.new_Frame(this);
    frame.setLayout(new BorderLayout());
    canvas = new GLCanvas(caps);
    canvas.addGLEventListener(this);
    frame.add(canvas, BorderLayout.CENTER);
  }
View Full Code Here

Examples of javax.media.opengl.awt.GLCanvas

    frameLayout.setVgap(0);
    frame.setLayout(frameLayout);
   
    GLProfile profile = GLProfile.getDefault();
    GLCapabilitiesImmutable capabilities = new GLCapabilities(profile);
    canvas = new GLCanvas(capabilities);
    canvas.addGLEventListener(this);
    frame.add(canvas, BorderLayout.CENTER);
   
    animator = new FPSAnimator(canvas, UI.FPS, true);
  }
View Full Code Here

Examples of javax.media.opengl.awt.GLCanvas

    private void initGL() {
        GLProfile profile = GLProfile.getDefault();

        GLCapabilities capabilities = new GLCapabilities(profile);

        canvas = new GLCanvas(capabilities);

        canvas.setSize(imageWidth, imageHeight);

        canvas.addGLEventListener(this);
    }
View Full Code Here

Examples of javax.media.opengl.awt.GLCanvas

public class OneTriangleSWTAWTBridge {

    public static void main( String [] args ) {
        GLProfile glprofile = GLProfile.getDefault();
        GLCapabilities glcapabilities = new GLCapabilities( glprofile );
        final GLCanvas glcanvas = new GLCanvas( glcapabilities );

        Display display = new Display();
        final Shell shell = new Shell( display );
        shell.setText( "OneTriangle SWT AWT Bridge" );
        shell.setLayout( new FillLayout() );
        shell.setSize( 640, 480 );

        final Composite composite = new Composite( shell, SWT.EMBEDDED );
        composite.setLayout( new FillLayout() );

        Frame frame = SWT_AWT.new_Frame( composite );
        frame.add( glcanvas );

        glcanvas.addGLEventListener( new GLEventListener() {
            @Override
            public void reshape( GLAutoDrawable glautodrawable, int x, int y, int width, int height ) {
                OneTriangle.setup( glautodrawable.getGL().getGL2(), width, height );
            }
           
View Full Code Here

Examples of javax.media.opengl.awt.GLCanvas

            newt.addKeyListener(listener);
            newt.addMouseListener(listener);

            drawable = newt;
        } else {
            final GLCanvas glCanvas = new GLCanvas(glcaps);

            final AwtListener listener = new AwtListener();
            glCanvas.addKeyListener(listener);
            glCanvas.addMouseListener(listener);
            glCanvas.addMouseMotionListener(listener);
            glCanvas.addMouseWheelListener(listener);

            drawable = glCanvas;
        }

        animator = new FPSAnimator(drawable, 30);
View Full Code Here

Examples of javax.media.opengl.awt.GLCanvas

        timer = new Timer(true);

        juliaSlice = newDirectFloatBuffer(MU_RECT_SIZE * MU_RECT_SIZE * 4);

        canvas = new GLCanvas(new GLCapabilities(GLProfile.get(GLProfile.GL2)));
        canvas.addGLEventListener(this);

        usi = new UserSceneController();
        usi.init(this, canvas, config);

View Full Code Here

Examples of javax.media.opengl.awt.GLCanvas

    public MultiDeviceFractal(int width, int height) {

        this.width = width;
        this.height = height;

        canvas = new GLCanvas(new GLCapabilities(GLProfile.get(GLProfile.GL2)));
        canvas.addGLEventListener(this);
        initSceneInteraction();

        Frame frame = new Frame("JOCL Multi Device Mandelbrot Set");
        frame.addWindowListener(new WindowAdapter() {
View Full Code Here

Examples of javax.media.opengl.awt.GLCanvas

        GLCapabilities config = new GLCapabilities(GLProfile.get(GLProfile.GL2));
        config.setSampleBuffers(true);
        config.setNumSamples(4);

        GLCanvas canvas = new GLCanvas(config);
        canvas.addGLEventListener(this);
        usi.init(canvas);

        JFrame frame = new JFrame("JOGL-JOCL Interoperability Example");
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        frame.add(canvas);
View Full Code Here

Examples of javax.media.opengl.awt.GLCanvas

        // setup OpenGL Version 2
        GLProfile profile = GLProfile.get(GLProfile.GL2);
        GLCapabilities capabilities = new GLCapabilities(profile);

        // The canvas is the widget that's drawn in the JFrame
        GLCanvas glcanvas = new GLCanvas(capabilities);
        glcanvas.addGLEventListener(new Renderer());
        glcanvas.setSize( 1000, 500 );

        JFrame frame = new JFrame( "Hello World" );
        frame.getContentPane().add( glcanvas);

        // shutdown the program on windows close event
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.