inline OpenGL functions to lwjgl GLxx
This commit is contained in:
parent
783adb350b
commit
a2ffb2991d
90 changed files with 1008 additions and 1204 deletions
|
@ -4,11 +4,12 @@ import java.awt.image.BufferedImage;
|
|||
import java.io.FileNotFoundException;
|
||||
import java.io.IOException;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import game.log.Log;
|
||||
import game.renderer.GlState;
|
||||
import game.renderer.texture.TextureUtil;
|
||||
import game.util.FileUtils;
|
||||
import game.window.WCF;
|
||||
|
||||
public class Font {
|
||||
public static final FontChar[] SIZES = new FontChar[256];
|
||||
|
@ -91,14 +92,14 @@ public class Font {
|
|||
int[] data = new int[XGLYPH * 16 * YGLYPH * 16];
|
||||
img.getRGB(0, 0, XGLYPH * 16, YGLYPH * 16, data, 0, XGLYPH * 16);
|
||||
calculate(data, SIZES, XGLYPH, YGLYPH, 0);
|
||||
texture = WCF.glGenTextures();
|
||||
texture = GL11.glGenTextures();
|
||||
TextureUtil.uploadImage(texture, img);
|
||||
Log.RENDER.debug("Font-Textur wurde mit ID #%d geladen", texture);
|
||||
}
|
||||
|
||||
public static void unload() {
|
||||
if(texture != 0) {
|
||||
WCF.glDeleteTextures(texture);
|
||||
GL11.glDeleteTextures(texture);
|
||||
Log.RENDER.debug("Font-Textur mit ID #%d wurde gelöscht", texture);
|
||||
texture = 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue