Package com.sun.opengl.util.texture

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


            gl.glVertex3d(cell.getX(), cell.getY(), 0);

            gl.glTexCoord2d(tc.right(), tc.top());
            gl.glVertex3d(cell.getX() + cell.getWidth(), cell.getY(), 0);

            gl.glTexCoord2d(tc.right(), tc.bottom());
            gl.glVertex3d(cell.getX() + cell.getWidth(),
                    cell.getY() + cell.getHeight(), 0);

            gl.glTexCoord2d(tc.left(), tc.bottom());
            gl.glVertex3d(cell.getX(), cell.getY() + cell.getHeight(), 0);
View Full Code Here


            gl.glTexCoord2d(tc.right(), tc.bottom());
            gl.glVertex3d(cell.getX() + cell.getWidth(),
                    cell.getY() + cell.getHeight(), 0);

            gl.glTexCoord2d(tc.left(), tc.bottom());
            gl.glVertex3d(cell.getX(), cell.getY() + cell.getHeight(), 0);
            gl.glEnd();
            t.disable();
        } catch (Exception e) {
            e.printStackTrace();
View Full Code Here

            gl.glVertex3d(cell.getX(), cell.getY(), 0);

            gl.glTexCoord2d(tc.right(), tc.top());
            gl.glVertex3d(cell.getX() + cell.getWidth(), cell.getY(), 0);

            gl.glTexCoord2d(tc.right(), tc.bottom());
            gl.glVertex3d(cell.getX() + cell.getWidth(), cell.getY()
                    + cell.getHeight(), 0);

            gl.glTexCoord2d(tc.left(), tc.bottom());
            gl.glVertex3d(cell.getX(), cell.getY() + cell.getHeight(), 0);
View Full Code Here

            gl.glTexCoord2d(tc.right(), tc.bottom());
            gl.glVertex3d(cell.getX() + cell.getWidth(), cell.getY()
                    + cell.getHeight(), 0);

            gl.glTexCoord2d(tc.left(), tc.bottom());
            gl.glVertex3d(cell.getX(), cell.getY() + cell.getHeight(), 0);
            gl.glEnd();
            t.disable();
        } catch (Exception e) {
            e.printStackTrace();
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) {
View Full Code Here

    Image joglImage = (Image)image;

    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) {
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;
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);
        c = t.getColor(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);
        c = t.getColor(2);
View Full Code Here

            p = t.getPoint(2);
        c = t.getColor(2);
        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() * tc3.x;
        texY = coords.top() + (coords.bottom() - coords.top()) / joglImage.texture.getImageHeight() * tc3.y;
        gl.glTexCoord2f(texX, texY);
            gl.glVertex2f(p.x, p.y);
   
        }
    } else {
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.