Package javax.media.opengl

Examples of javax.media.opengl.GL2.glClear()


    }

    public void renderScreenshot(GLAutoDrawable drawable) {
        GL2 gl = drawable.getGL().getGL2();
        if (vizController.getVizModel().isUse3d()) {
            gl.glClear(GL2.GL_COLOR_BUFFER_BIT | GL2.GL_DEPTH_BUFFER_BIT);
        } else {
            gl.glClear(GL2.GL_COLOR_BUFFER_BIT);
        }
        setCameraPosition(gl, glu);
        engine.display(gl, glu);
View Full Code Here


    public void renderScreenshot(GLAutoDrawable drawable) {
        GL2 gl = drawable.getGL().getGL2();
        if (vizController.getVizModel().isUse3d()) {
            gl.glClear(GL2.GL_COLOR_BUFFER_BIT | GL2.GL_DEPTH_BUFFER_BIT);
        } else {
            gl.glClear(GL2.GL_COLOR_BUFFER_BIT);
        }
        setCameraPosition(gl, glu);
        engine.display(gl, glu);
    }
View Full Code Here

        }

        GL2 gl = drawable.getGL().getGL2();

        if (vizController.getVizModel().isUse3d()) {
            gl.glClear(GL2.GL_COLOR_BUFFER_BIT | GL2.GL_DEPTH_BUFFER_BIT);
        } else {
            gl.glClear(GL2.GL_COLOR_BUFFER_BIT);
        }

        render3DScene(gl, glu);
View Full Code Here

        GL2 gl = drawable.getGL().getGL2();

        if (vizController.getVizModel().isUse3d()) {
            gl.glClear(GL2.GL_COLOR_BUFFER_BIT | GL2.GL_DEPTH_BUFFER_BIT);
        } else {
            gl.glClear(GL2.GL_COLOR_BUFFER_BIT);
        }

        render3DScene(gl, glu);
    }
View Full Code Here

            gl.glTranslated(-this.eye.x - this.center.x, -this.eye.y - this.center.y, -this.eye.z - this.center.z);
        } else {
            // Shift model to center of window.
            gl.glTranslated(-this.center.x, -this.center.y, 0);
        }
        gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT);

        // Draw model
        if (isDrawable) {
            //renderAxes(drawable);
            renderModel(drawable);
View Full Code Here

      gl.glPolygonMode(GL.GL_FRONT_AND_BACK, GL2.GL_FILL);
    else
      gl.glPolygonMode(GL.GL_FRONT_AND_BACK, GL2.GL_LINE);

    // clear the display
    gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_STENCIL_BUFFER_BIT);
   
    // check if we need to highlight pixels which are inside the polygon
    if (this.insideOutsideTest) {
      // push the current color
      gl.glPushAttrib(GL2.GL_CURRENT_BIT);
View Full Code Here

    */

    @Override
    public void display(GLAutoDrawable drawable) {
        GL2 gl = drawable.getGL().getGL2(); // get the OpenGL 2 graphics context
        gl.glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); // clear color and depth buffers
        gl.glLoadIdentity(); // reset the model-view matrix

        // ------ Bind texture ------
        texture.enable(gl);
        texture.bind(gl);
View Full Code Here

    */

    @Override
    public void display(GLAutoDrawable drawable) {
        GL2 gl = drawable.getGL().getGL2(); // get the OpenGL 2 graphics context
        gl.glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); // clear color and depth buffers
        gl.glLoadIdentity(); // reset the model-view matrix

        // ------ Bind texture ------
        texture.enable(gl);
        texture.bind(gl);
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.