/** A GL2 context MUST be current. */ @Override public void mount(GL gl) { try { load(gl, image); } catch (Exception e) { throw new RuntimeException(e); } coords = texture.getImageTexCoords(); halfWidth = texture.getWidth() / 2; halfHeight = texture.getHeight() / 2; }
/** A GL2 context MUST be current. */ @Override public void mount(GL gl) { try { load(gl, file); } catch (Exception e) { throw new RuntimeException(e); } coords = texture.getImageTexCoords(); halfWidth = texture.getWidth() / 2; halfHeight = texture.getHeight() / 2; }
protected void applyTexture(Texture texture) { int width = texture.getWidth(); int height = texture.getHeight(); TextureCoords coords = texture.getImageTexCoords(); applyTexture(texture, 0, 0, width, height, coords.left(), coords.top(), coords.right(), coords.bottom()); }
protected void applyTexture(Texture texture) { int width = texture.getWidth(); int height = texture.getHeight(); TextureCoords coords = texture.getImageTexCoords(); applyTexture(texture, 0, 0, width, height, coords.left(), coords.top(), coords.right(), coords.bottom()); }
final TextureSequence.TextureFrame frame = colorTexSeq.getLastTexture(); final Texture tex = frame.getTexture(); final TextureCoords tc = tex.getImageTexCoords(); final float tcSx = 1f / ( tc.right() - tc.left() ); colorTexBBox[0] = box.getMinX() * tcSx;
final TextureSequence.TextureFrame frame = colorTexSeq.getLastTexture(); final Texture tex = frame.getTexture(); final TextureCoords tc = tex.getImageTexCoords(); final float tcSx = 1f / ( tc.right() - tc.left() ); colorTexBBox[0] = box.getMinX() * tcSx;
final TextureSequence.TextureFrame frame = colorTexSeq.getLastTexture(); final Texture tex = frame.getTexture(); final TextureCoords tc = tex.getImageTexCoords(); final float tcSx = 1f / ( tc.right() - tc.left() ); colorTexBBox[0] = box.getMinX() * tcSx;
final TextureSequence.TextureFrame frame = colorTexSeq.getLastTexture(); final Texture tex = frame.getTexture(); final TextureCoords tc = tex.getImageTexCoords(); final float tcSx = 1f / ( tc.right() - tc.left() ); colorTexBBox[0] = box.getMinX() * tcSx;
final TextureSequence.TextureFrame frame = colorTexSeq.getLastTexture(); final Texture tex = frame.getTexture(); final TextureCoords tc = tex.getImageTexCoords(); final float tcSx = 1f / ( tc.right() - tc.left() ); colorTexBBox[0] = box.getMinX() * tcSx;
final TextureSequence.TextureFrame frame = colorTexSeq.getLastTexture(); final Texture tex = frame.getTexture(); final TextureCoords tc = tex.getImageTexCoords(); final float tcSx = 1f / ( tc.right() - tc.left() ); colorTexBBox[0] = box.getMinX() * tcSx;
final TextureCoords wholeImageTexCoords = renderer.getTexture().getImageTexCoords(); final float xScale = wholeImageTexCoords.right(); final float yScale = wholeImageTexCoords.bottom();
private void renderFace(GL2 gl, Texture t) { TextureCoords tc = t.getImageTexCoords(); float tx1 = tc.left(); float ty1 = tc.top(); float tx2 = tc.right(); float ty2 = tc.bottom(); t.enable(gl); t.bind(gl); if (button==4) gl.glColor4f(0.8f, 0.2f, 0.2f, alpha); else gl.glColor4f(alpha, alpha, alpha, alpha); gl.glBegin(GL2.GL_QUADS); gl.glTexCoord2f(tx1, ty1); gl.glVertex2f(currentRect.x, currentRect.y); gl.glTexCoord2f(tx2, ty1); gl.glVertex2f(currentRect.x, currentRect.y + currentRect.height); gl.glTexCoord2f(tx2, ty2); gl.glVertex2f(currentRect.x + currentRect.width, currentRect.y + currentRect.height); gl.glTexCoord2f(tx1, ty2); gl.glVertex2f(currentRect.x + currentRect.width, currentRect.y); gl.glEnd(); t.disable(gl); }
this.texture.updateImage( gl, textureData ); TextureCoords textureCoords = this.texture.getImageTexCoords( ); float texTop = textureCoords.top( ); float texLeft = textureCoords.left( );
texture.bind(gl); tc = texture.getImageTexCoords();
float[] fl = getKoords(); final TextureCoords tc = this.back.getImageTexCoords(); final float tx1 = tc.left(); final float ty1 = tc.top();
TextureCoords tc = texture.getImageTexCoords();
TextureCoords tc = texture.getImageTexCoords(); gl.glBegin(GL2.GL_QUADS);