fix(rendering): fix an error of FontPlaneTexture
@@ -2,12 +2,11 @@ package nullengine.client.rendering.gl.font;
import nullengine.client.rendering.font.Font;
import nullengine.client.rendering.font.UnicodeBlockWrapper;
-import nullengine.client.rendering.gl.texture.FilterMode;
import nullengine.client.rendering.gl.texture.GLTexture2D;
+import nullengine.client.rendering.texture.FilterMode;
import nullengine.math.Math2;
import org.joml.Vector4f;
import org.lwjgl.BufferUtils;
-import org.lwjgl.opengl.GL11;
import org.lwjgl.stb.STBTTAlignedQuad;
import org.lwjgl.stb.STBTTPackContext;
import org.lwjgl.stb.STBTTPackRange;
@@ -19,7 +18,8 @@ import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
-import static org.lwjgl.opengl.GL11.*;
+import static org.lwjgl.opengl.GL11.GL_RED;
+import static org.lwjgl.opengl.GL11.GL_UNSIGNED_BYTE;
import static org.lwjgl.stb.STBTruetype.*;
public class FontPlaneTexture {
@@ -95,7 +95,7 @@ public class FontPlaneTexture {
stbtt_PackFontRanges(context, fontInfo.getFontData(), fontInfo.getOffsetIndex(), ranges);
stbtt_PackEnd(context);
- glTexture = GLTexture2D.builder().format(GL_RED).internalFormat(GL_RED).type(GL_UNSIGNED_BYTE).magFilter(FilterMode.LINEAR).minFilter(FilterMode.LINEAR).level(0).build(bitmap, bitmapSize,bitmapSize);
+ glTexture = GLTexture2D.builder().format(GL_RED).internalFormat(GL_RED).type(GL_UNSIGNED_BYTE).magFilter(FilterMode.LINEAR).minFilter(FilterMode.LINEAR).build(bitmap, bitmapSize, bitmapSize);
STBTTAlignedQuad stbQuad = STBTTAlignedQuad.mallocStack();
for (int i = 0; i < blocks.size(); i++) {
FloatBuffer posX = BufferUtils.createFloatBuffer(1);
