Examples of glTranslatef()


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

        // ------ Bind texture ------
        texture.enable(gl);
        texture.bind(gl);

        // ----- Your OpenGL rendering code here ( Render a white triangle for testing ) -----
        gl.glTranslatef(0.0f, 0.0f, -6.0f); // translate into the screen
        gl.glBegin(GL_QUADS); // draw using quads
            gl.glTexCoord2f(textureLeft, textureBottom);
            gl.glVertex3f(0.0f, 0.0f, 0.0f);

            gl.glTexCoord2f(textureRight, textureTop);
View Full Code Here

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

        // ------ Bind texture ------
        texture.enable(gl);
        texture.bind(gl);

        // ----- Your OpenGL rendering code here ( Render a white triangle for testing ) -----
        gl.glTranslatef(0.0f, 0.0f, -6.0f); // translate into the screen
        gl.glBegin(GL_QUADS); // draw using quads
            gl.glTexCoord2f(textureLeft, textureBottom);
            gl.glVertex3f(0.0f, 0.0f, 0.0f);

            gl.glTexCoord2f(textureRight, textureTop);
View Full Code Here

Examples of javax.microedition.khronos.opengles.GL11.glTranslatef()

        gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT);

        // Transform the cube
        gl.glMatrixMode(GL10.GL_MODELVIEW);
        gl.glLoadIdentity();
        gl.glTranslatef(0, 0, -3.5f);
        gl.glRotatef(_rotation.getFloat(), 1.0f, 1.0f, 0.0f);

        // Enable position, normal and texture coordinates
        _cube.enableVertexAttrib();
        _cube.enableTexcoordAttrib();
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.