Rendering Font

Started by Therobodavo, November 15, 2015, 19:07:52

Previous topic - Next topic

Therobodavo

So I use slick to load font or whatever. I tried so many things, but left it with angelcodefont with a custom font i made that should work. (I made sure I had everything right from a youtube video and another forum).

The issue is, it always renders upside down. I understand why this happens, as I have lwjgl set 0,0 at the bottom left and slick is at the top left.

My whole game is designed from the bottom left, and I'm trying to figure out a fix. I'm using Lwjgl 2 if that helps, and I=my code does work to render in font that renders upside down.

Example:

https://gyazo.com/046ec3f8ef8079202560b2dbfab8681f


I'll include my init code for openGL/Lwjgl just in case...

        GL11.glEnable(GL11.GL_TEXTURE_2D);
        GL11.glClearColor(1.0f, 1.0f, 1.0f, 1.0f);
        GL11.glEnable(GL11.GL_BLEND);
        GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
        GL11.glMatrixMode(GL11.GL_PROJECTION);
        GL11.glEnable(GL11.GL_ALPHA_TEST);
        GL11.glAlphaFunc(GL11.GL_GREATER, 0.1f);
        GL11.glLoadIdentity();
        GL11.glOrtho(0, 800, 0, 600, 1, -1);
        GL11.glMatrixMode(GL11.GL_MODELVIEW);



Any ideas? I can include anything else that may be helpful. I've tried googling this issue for awhile, and I can't find a fix that doesn't require me to recode either slick or my whole game.