Package com.sun.opengl.util.texture

Examples of com.sun.opengl.util.texture.TextureCoords.bottom()


        Vector2f tc3 = t.getTextureCoordinate(2);
        if (tc3 == null) throw new IllegalArgumentException("Texture coordinate for triangle must not be null");

        p = t.getPoint(0);
        float texX = coords.left() + (coords.right() - coords.left()) / joglImage.texture.getImageWidth() * tc1.x;
        float texY = coords.top() + (coords.bottom() - coords.top()) / joglImage.texture.getImageHeight() * tc1.y;
        gl.glTexCoord2f(texX, texY);
            gl.glVertex2f(p.x, p.y);
       
            p = t.getPoint(1);
        texX = coords.left() + (coords.right() - coords.left()) / joglImage.texture.getImageWidth() * tc2.x;
 
View Full Code Here


        gl.glTexCoord2f(texX, texY);
            gl.glVertex2f(p.x, p.y);
       
            p = t.getPoint(1);
        texX = coords.left() + (coords.right() - coords.left()) / joglImage.texture.getImageWidth() * tc2.x;
        texY = coords.top() + (coords.bottom() - coords.top()) / joglImage.texture.getImageHeight() * tc2.y;
        gl.glTexCoord2f(texX, texY);
            gl.glVertex2f(p.x, p.y);
       
            p = t.getPoint(2);
        texX = coords.left() + (coords.right() - coords.left()) / joglImage.texture.getImageWidth() * tc3.x;
 
View Full Code Here

        gl.glTexCoord2f(texX, texY);
            gl.glVertex2f(p.x, p.y);
       
            p = t.getPoint(2);
        texX = coords.left() + (coords.right() - coords.left()) / joglImage.texture.getImageWidth() * tc3.x;
        texY = coords.top() + (coords.bottom() - coords.top()) / joglImage.texture.getImageHeight() * tc3.y;
        gl.glTexCoord2f(texX, texY);
            gl.glVertex2f(p.x, p.y);
   
        }
    }
View Full Code Here

       
    gl.glTexCoord2f(coords.left(), coords.top());
        gl.glVertex2f(0, 0);
        gl.glTexCoord2f(coords.right(), coords.top());
        gl.glVertex2f(image.getWidth(), 0);
        gl.glTexCoord2f(coords.left(), coords.bottom());
        gl.glVertex2f(0, image.getHeight());
        gl.glTexCoord2f(coords.right(), coords.bottom());
        gl.glVertex2f(image.getWidth(), image.getHeight());

        gl.glEnd();
View Full Code Here

        gl.glVertex2f(0, 0);
        gl.glTexCoord2f(coords.right(), coords.top());
        gl.glVertex2f(image.getWidth(), 0);
        gl.glTexCoord2f(coords.left(), coords.bottom());
        gl.glVertex2f(0, image.getHeight());
        gl.glTexCoord2f(coords.right(), coords.bottom());
        gl.glVertex2f(image.getWidth(), image.getHeight());

        gl.glEnd();
       
        gl.glGetIntegerv(GL.GL_PACK_ROW_LENGTH,  rowLength,  0); // save row length
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.