You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
56 lines
872 B
56 lines
872 B
package mightypork.gamecore.render.textures;
|
|
|
|
|
|
import org.lwjgl.opengl.GL11;
|
|
import org.newdawn.slick.opengl.Texture;
|
|
|
|
|
|
public interface FilteredTexture extends Texture {
|
|
|
|
public static enum Filter
|
|
{
|
|
LINEAR(GL11.GL_LINEAR), NEAREST(GL11.GL_NEAREST);
|
|
|
|
public final int num;
|
|
|
|
|
|
private Filter(int gl) {
|
|
this.num = gl;
|
|
}
|
|
}
|
|
|
|
public static enum Wrap
|
|
{
|
|
CLAMP(GL11.GL_CLAMP), REPEAT(GL11.GL_REPEAT);
|
|
|
|
public final int num;
|
|
|
|
|
|
private Wrap(int gl) {
|
|
this.num = gl;
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
* Set filter for scaling
|
|
*
|
|
* @param filterMin downscale filter
|
|
* @param filterMag upscale filter
|
|
*/
|
|
void setFilter(Filter filterMin, Filter filterMag);
|
|
|
|
|
|
/**
|
|
* Set filter for scaling (both up and down)
|
|
*
|
|
* @param filter filter
|
|
*/
|
|
void setFilter(Filter filter);
|
|
|
|
|
|
/**
|
|
* @param wrapping wrap mode
|
|
*/
|
|
void setWrap(Wrap wrapping);
|
|
}
|
|
|