44 lines
1.9 KiB
Java
44 lines
1.9 KiB
Java
package speiger.src.coreengine.rendering.textures.custom;
|
|
|
|
import speiger.src.coreengine.rendering.textures.base.ITexture;
|
|
|
|
public interface IDynamicTexture extends ITexture {
|
|
public boolean isDirty();
|
|
public void process(boolean full);
|
|
|
|
public default void dirty(int index) { dirty(index % width(), index / width()); }
|
|
public void dirty(int x, int y);
|
|
|
|
public void set(int index, int data);
|
|
public default void set(int x, int y, int data) { set((y * width()) + x, data); }
|
|
|
|
public default void set(int index, int red, int green, int blue, int alpha) { set(index, ((alpha & 0xFF) << 24) | ((red & 0xFF) << 16) | ((green & 0xFF) << 8) | (blue & 0xFF)); }
|
|
public default void set(int x, int y, int red, int green, int blue, int alpha) { set((y * width()) + x, ((alpha & 0xFF) << 24) | ((red & 0xFF) << 16) | ((green & 0xFF) << 8) | (blue & 0xFF)); }
|
|
|
|
public void setR(int index, int red);
|
|
public default void setR(int x, int y, int red) { setR((y * width()) + x, red); }
|
|
|
|
public void setG(int index, int green);
|
|
public default void setG(int x, int y, int green) { setG((y * width()) + x, green); }
|
|
|
|
public void setB(int index, int blue);
|
|
public default void setB(int x, int y, int blue) { setB((y * width()) + x, blue); }
|
|
|
|
public void setA(int index, int alpha);
|
|
public default void setA(int x, int y, int alpha) { setA((y * width()) + x, alpha); }
|
|
|
|
public int get(int index);
|
|
public default int get(int x, int y) { return get((y * width()) + x); }
|
|
|
|
public int getR(int index);
|
|
public default int getR(int x, int y) { return getR((y * width()) + x); }
|
|
public int getG(int index);
|
|
public default int getG(int x, int y) { return getG((y * width()) + x); }
|
|
public int getB(int index);
|
|
public default int getB(int x, int y) { return getB((y * width()) + x); }
|
|
public int getA(int index);
|
|
public default int getA(int x, int y) { return getA((y * width()) + x); }
|
|
|
|
|
|
}
|