Package javax.media.opengl.awt

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


            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

      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

    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

    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

    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

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

            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

        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

    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

TOP

Related Classes of javax.media.opengl.awt.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.