Package javax.media.opengl

Examples of javax.media.opengl.GL.glCullFace()


    gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT)//Clear the buffers
    gl.glLoadIdentity();                      //Reset the view
    gl.glTranslatef(0.0f, -2.0f, zOffset);              //Translate the scene backwards   
   
    gl.glPolygonMode(GL.GL_FRONT_AND_BACK, render_mode);
    gl.glCullFace(GL.GL_FRONT);
    gl.glEnable(GL.GL_CULL_FACE);/**/
   
        gl.glRotatef(xRot, 1f, 0f, 0f);
        gl.glRotatef(yRot, 0f, 1f, 0f);
        gl.glRotatef(zRot, 0f, 0f, 1f);
View Full Code Here


    private static void setCull(final int face, final CullState state, final CullStateRecord record) {
        final GL gl = GLContext.getCurrentGL();

        if (!record.isValid() || record.face != face) {
            gl.glCullFace(face);
            record.face = face;
        }
    }

    private static void setGLPolygonWind(final PolygonWind windOrder, final CullState state,
View Full Code Here

    gl.glColorMaterial(GL.GL_FRONT, GL.GL_AMBIENT_AND_DIFFUSE);
    gl.glEnable(GL.GL_COLOR_MATERIAL);

    // Remove back-face rendering

    gl.glCullFace(GL.GL_BACK);
    gl.glEnable(GL.GL_CULL_FACE);

    // Initialize ShapesManager

    shapeManager = new ShapeManager(gl, glu, world.turtleShapeList(), world.linkShapeList(),
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.