Examples of glClear()


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

    if ((drawable instanceof GLJPanel) &&
        !((GLJPanel) drawable).isOpaque() &&
        ((GLJPanel) drawable).shouldPreserveColorBufferIfTranslucent()) {
      gl.glClear(GL2.GL_DEPTH_BUFFER_BIT);
    } else {
      gl.glClear(GL2.GL_COLOR_BUFFER_BIT | GL2.GL_DEPTH_BUFFER_BIT);
    }
           
    // Rotate the entire assembly of gears based on how the user
    // dragged the mouse around
    gl.glPushMatrix();
View Full Code Here

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

    private GLU glu = new GLU();

    public void display(GLAutoDrawable gLDrawable)
    {
        final GL2 gl = gLDrawable.getGL().getGL2();
        gl.glClear(GL2.GL_COLOR_BUFFER_BIT | GL2.GL_DEPTH_BUFFER_BIT);
        gl.glLoadIdentity();
        gl.glTranslatef(-1.5f, 0.0f, -10.0f);
        gl.glColor3f(0f, 255f, 255f);
        gl.glRotated(20,20,0,20);
        gl.glBegin(GL2.GL_TRIANGLES);
View Full Code Here

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

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

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

        }

        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

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

        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

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

            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

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

      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

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

    */

    @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

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

    */

    @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.