Package com.jogamp.opengl.util.texture

Examples of com.jogamp.opengl.util.texture.TextureCoords.left()


   * @param centerX X coordinate for the center of the texture
   * @param centerY Y coordinate for the center of the texture
   */
  private void renderTexture(Texture texture, double centerX, double centerY) {
    TextureCoords tc = texture.getImageTexCoords();
    float tx1 = tc.left();
    float ty1 = tc.top();
    float tx2 = tc.right();
    float ty2 = tc.bottom();
    float halfWidth = quarterValue(texture.getWidth());
    float halfHeight = quarterValue(texture.getHeight());
View Full Code Here


    startPrimitive(Primitive.IMAGE, joglImage);
       
    TextureCoords coords = joglImage.texture.getImageTexCoords();
    float texTop = coords.top();
    float texBottom = coords.bottom();
    float texLeft = coords.left();
    float texRight = coords.right();

   
    if(flip == Flip.BOTH || flip == Flip.HORIZONTAL) {
      float temp = texTop;
View Full Code Here

    startPrimitive(Primitive.IMAGE, joglImage);

    TextureCoords coords = joglImage.texture.getImageTexCoords();
    float texTop = coords.top() + (coords.bottom() - coords.top()) / image.getHeight() * subImageY;
    float texBottom = coords.top() + (coords.bottom() - coords.top()) / image.getHeight() * (subImageY + subImageHeight);
    float texLeft = coords.left() + (coords.right() - coords.left()) / image.getWidth() * subImageX;
    float texRight = coords.left() + (coords.right() - coords.left()) / image.getWidth() * (subImageX + subImageWidth);

    if(flip == Flip.BOTH || flip == Flip.HORIZONTAL) {
      float temp = texTop;
      texTop = texBottom;
View Full Code Here

    startPrimitive(Primitive.IMAGE, joglImage);

    TextureCoords coords = joglImage.texture.getImageTexCoords();
    float texTop = coords.top() + (coords.bottom() - coords.top()) / image.getHeight() * subImageY;
    float texBottom = coords.top() + (coords.bottom() - coords.top()) / image.getHeight() * (subImageY + subImageHeight);
    float texLeft = coords.left() + (coords.right() - coords.left()) / image.getWidth() * subImageX;
    float texRight = coords.left() + (coords.right() - coords.left()) / image.getWidth() * (subImageX + subImageWidth);

    if(flip == Flip.BOTH || flip == Flip.HORIZONTAL) {
      float temp = texTop;
      texTop = texBottom;
View Full Code Here

    TextureCoords coords = joglImage.texture.getImageTexCoords();
    float texTop = coords.top() + (coords.bottom() - coords.top()) / image.getHeight() * subImageY;
    float texBottom = coords.top() + (coords.bottom() - coords.top()) / image.getHeight() * (subImageY + subImageHeight);
    float texLeft = coords.left() + (coords.right() - coords.left()) / image.getWidth() * subImageX;
    float texRight = coords.left() + (coords.right() - coords.left()) / image.getWidth() * (subImageX + subImageWidth);

    if(flip == Flip.BOTH || flip == Flip.HORIZONTAL) {
      float temp = texTop;
      texTop = texBottom;
      texBottom = temp;
View Full Code Here

    TextureCoords coords = joglImage.texture.getImageTexCoords();
    float texTop = coords.top() + (coords.bottom() - coords.top()) / image.getHeight() * subImageY;
    float texBottom = coords.top() + (coords.bottom() - coords.top()) / image.getHeight() * (subImageY + subImageHeight);
    float texLeft = coords.left() + (coords.right() - coords.left()) / image.getWidth() * subImageX;
    float texRight = coords.left() + (coords.right() - coords.left()) / image.getWidth() * (subImageX + subImageWidth);

    if(flip == Flip.BOTH || flip == Flip.HORIZONTAL) {
      float temp = texTop;
      texTop = texBottom;
      texBottom = temp;
View Full Code Here

   
        p = t.getPoint(0);
        c = t.getColor(0);
        if(c == null) c = color;
        gl.glColor4f(c.x, c.y, c.z, c.w);
        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);
View Full Code Here

   
        p = t.getPoint(0);
        c = t.getColor(0);
        if(c == null) c = color;
        gl.glColor4f(c.x, c.y, c.z, c.w);
        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);
View Full Code Here

       
            p = t.getPoint(1);
        c = t.getColor(1);
        if(c == null) c = color;
        gl.glColor4f(c.x, c.y, c.z, c.w);
        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);
View Full Code Here

       
            p = t.getPoint(1);
        c = t.getColor(1);
        if(c == null) c = color;
        gl.glColor4f(c.x, c.y, c.z, c.w);
        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);
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.