Font Texture is being written incorrectly [Solved]

I am trying to update my font rendering code to use vertex buffers and my new shader transformation code. However, when I write the buffered image created in the process to a file, the characters print really incorrectly.

(There is also an issue with a white box for each letter, but getting this issue fixed will further the debugging process.)

Font image when written to a file: http://imgur.com/nYdif7j (I can’t show the image because the font is white and it would be impossible to see)

Source to create the image that isn’t working

// See next post

Any help would be appreciated!

So I got the font texture to write correctly, but now the texture isn’t being drawn, but rather a white box.

How the font is rendered:

  • The font is created as a buffered image and regions are stored
  • The texture is used to create a buffer for each character
  • Buffers are rendered and textures are bound with my fragment shader

Pastebin: http://pastebin.java-gaming.org/b909a3b65181c

However, while my vertex buffer object class typically renders correctly (I use the class for other things), it just doesn’t work for this font and I can’t figure out why.

Any help would be appreciated :slight_smile:

Sorry for triple-posting, but I fixed my issue.

I had to enable alpha testing for my shader-based texturing.