Examples of GLCanvas


Examples of javax.media.opengl.awt.GLCanvas

    private final GLCanvas glCanvas;
    private final GLUT glut = new GLUT();

    public GraphCanvas() {
        super();
        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.awt.GLCanvas

  public Window() {
    GLProfile glp = GLProfile.getMinimum(true);
    GLCapabilities caps = new GLCapabilities(glp);
    caps.setDepthBits(24);
    this.canvas = new GLCanvas(caps);

    this.frame = new JFrame("Hexel");
    this.frame.setSize(1280, 800);
    this.frame.add(this.canvas);
    this.frame.setVisible(true);
View Full Code Here

Examples of javax.media.opengl.awt.GLCanvas

     * @param c the container to which to add the canvas
     * @throws IllegalStateException if the Canvas3D is already attached to a Container
     */
    void addNotify(Container c) {
        if (canvas != null) throw new IllegalStateException(Xenon3D.ERR_CANVAS_ALREADY_ATTACHED);
        canvas = new GLCanvas(caps);
        if (view != null) canvas.addGLEventListener(view.getInternalListener());
        c.add(canvas);
    }
View Full Code Here

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

    this.ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
    this.gd = ge.getDefaultScreenDevice();
    this.gc = gd.getDefaultConfiguration();
   
//    this.canvas = new GLCanvas(caps);
    this.canvas = new GLCanvas();
    this.canvas.addMouseListener(ioListener);
    this.canvas.addMouseMotionListener(ioListener);
    this.canvas.addMouseWheelListener(ioListener);
    this.canvas.addKeyListener(ioListener);
   
View Full Code Here

Examples of javax.media.opengl.awt.GLCanvas

  private PA1() {
    // enables double buffering
    this.capabilities.setDoubleBuffered(true);
    this.capabilities.setStencilBits(8);
   
    this.canvas = new GLCanvas(this.capabilities);
    this.canvas.addGLEventListener(this);
    this.canvas.addMouseListener(this);
    this.canvas.addMouseMotionListener(this);
    this.canvas.addKeyListener(this);
    // auto swap buffer mode is true by default, but we are explicit here
View Full Code Here

Examples of javax.media.opengl.awt.GLCanvas

        // Run the GUI codes in the event-dispatching thread for thread safety
        SwingUtilities.invokeLater(new Runnable() {
            @Override
            public void run() {
                //Create the OpenGL rendering canvas
                GLCanvas canvas = new NormansAdventure();
                canvas.setPreferredSize( new Dimension(CANVAS_WIDTH, CANVAS_HEIGHT));
               
                // Create an animator that drives canvas' display() at the specified FPS
                final FPSAnimator animator = new FPSAnimator(canvas, FPS, true);
               
                //Create the top-level container
View Full Code Here

Examples of org.eclipse.swt.opengl.GLCanvas

        super(parent, flags);

        setLayout(new FillLayout());
        GLData data = new GLData();
        data.doubleBuffer = true;
        canvas = new GLCanvas(this, SWT.NONE, data);
        canvas.setCurrent();
        context = GLDrawableFactory.getFactory().createExternalGLContext();
        canvas.addListener(SWT.Resize, new Listener() {
            @Override
            public void handleEvent(Event event) {
View Full Code Here

Examples of org.eclipse.swt.opengl.GLCanvas

  public GLScene(Composite parent) {
    GLData data = new GLData();
    data.doubleBuffer = true;
    data.depthSize = 16;
    canvas = new GLCanvas(parent, SWT.NO_BACKGROUND, data);
    canvas.setCurrent();

    context = createGLContext();

    GL rawGL = context.getGL();
View Full Code Here

Examples of org.eclipse.swt.opengl.GLCanvas

    public SceneRefresher(GLScene scene) {
      this.scene = scene;
    }

    public boolean isDrawable() {
      GLCanvas canvas = scene.getContext();
      if (canvas == null) {
        return false;
      }
      return !canvas.isDisposed();
    }
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.