Examples of glCullFace()


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

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

    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

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

    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

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

    void resetPolygonAttributes(Context ctx) {
        if (VERBOSE) System.err.println("JoglPipeline.resetPolygonAttributes()");

    GL2 gl = context(ctx).getGL().getGL2();

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

        gl.glLightModeli(GL2.GL_LIGHT_MODEL_TWO_SIDE, GL.GL_FALSE);

        gl.glPolygonMode(GL.GL_FRONT_AND_BACK, GL2.GL_FILL);
View Full Code Here

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

        if (cullFace == PolygonAttributes.CULL_NONE) {
            gl.glDisable(GL.GL_CULL_FACE);
        } else {
            if (cullFace == PolygonAttributes.CULL_BACK) {
                gl.glCullFace(GL.GL_BACK);
            } else {
                gl.glCullFace(GL.GL_FRONT);
            }
            gl.glEnable(GL.GL_CULL_FACE);
        }
View Full Code Here

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

            gl.glDisable(GL.GL_CULL_FACE);
        } else {
            if (cullFace == PolygonAttributes.CULL_BACK) {
                gl.glCullFace(GL.GL_BACK);
            } else {
                gl.glCullFace(GL.GL_FRONT);
            }
            gl.glEnable(GL.GL_CULL_FACE);
        }

        if (backFaceNormalFlip && (cullFace != PolygonAttributes.CULL_BACK)) {
View Full Code Here

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

        gl3.glGenVertexArrays(1, IntBuffer.wrap(vertexArrayObject));
        gl3.glBindVertexArray(vertexArrayObject[0]);

        gl3.glEnable(GL3.GL_CULL_FACE);
        gl3.glCullFace(GL3.GL_BACK);
        gl3.glFrontFace(GL3.GL_CW);
    }

    @Override
    public void dispose(GLAutoDrawable glad) {
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.