package client.renderer.texture;

import java.io.IOException;

import org.lwjgl.opengl.GL11;

import client.renderer.GlState;

public abstract class Texture {
	private int id = -1;

	public final int getGlTextureId() {
		if(this.id == -1)
			this.id = GL11.glGenTextures();
		return this.id;
	}

	public final void deleteGlTexture() {
		if(this.id != -1) {
			GlState.deleteTexture(this.id);
			this.id = -1;
		}
	}

	public abstract void loadTexture() throws IOException;
}
