@Override public Texture createSimpleClone(final Texture rVal) { rVal.setWrap(WrapAxis.S, _wrapS); rVal.setWrap(WrapAxis.T, _wrapT); rVal.setWrap(WrapAxis.R, _wrapR); if (rVal instanceof TextureCubeMap) { ((TextureCubeMap) rVal).setCurrentRTTFace(_currentRTTFace); } return super.createSimpleClone(rVal); }
/** * Construct a new SubTex that covers the entire width and height of the supplied Texture. * * @param texture * the base texture. Must already have a supplied image with a valid width and height. */ public SubTex(final Texture texture) { this(texture, 0, 0, texture.getImage().getWidth(), texture.getImage().getHeight()); }
@Override public Texture createSimpleClone(final Texture rVal) { rVal.setWrap(WrapAxis.S, _wrapS); rVal.setWrap(WrapAxis.T, _wrapT); rVal.setWrap(WrapAxis.R, _wrapR); return super.createSimpleClone(rVal); }
@Override public boolean equals(final Object other) { if (!(other instanceof Texture2D)) { return false; } final Texture2D that = (Texture2D) other; if (getWrap(WrapAxis.S) != that.getWrap(WrapAxis.S)) { return false; } if (getWrap(WrapAxis.T) != that.getWrap(WrapAxis.T)) { return false; } return super.equals(other); }
public static final int getPixelByteSize(final ImageDataFormat format, final PixelDataType type) { return type.getBytesPerPixel(format.getComponents()); }
/** * Construct a new SubTex that covers the entire width and height of the supplied Texture. * * @param texture * the base texture. Must already have a supplied image with a valid width and height. */ public SubTex(final Texture texture) { this(texture, 0, 0, texture.getImage().getWidth(), texture.getImage().getHeight()); }
@Override public Texture createSimpleClone(final Texture rVal) { rVal.setWrap(WrapAxis.S, _wrapS); rVal.setWrap(WrapAxis.T, _wrapT); rVal.setWrap(WrapAxis.R, _wrapR); if (rVal instanceof TextureCubeMap) { ((TextureCubeMap) rVal).setCurrentRTTFace(_currentRTTFace); } return super.createSimpleClone(rVal); }
@Override public boolean equals(final Object other) { if (!(other instanceof Texture2D)) { return false; } final Texture2D that = (Texture2D) other; if (getWrap(WrapAxis.S) != that.getWrap(WrapAxis.S)) { return false; } if (getWrap(WrapAxis.T) != that.getWrap(WrapAxis.T)) { return false; } return super.equals(other); }
public static final int getPixelByteSize(final ImageDataFormat format, final PixelDataType type) { return type.getBytesPerPixel(format.getComponents()); }