FreeType texture atlas completely white

615 views Asked by At

I'm following this tutorial to render texts using OpenGL: http://en.wikibooks.org/wiki/OpenGL_Programming/Modern_OpenGL_Tutorial_Text_Rendering_02

However, when I inspect the bitmap.buffer of each character loaded it is filled with 255, completely. Then, when I render, all I can see is a white rectangle.

Top white rectangle The rectangle I'm talking about is the one on the top (in the black viewport).

1

There are 1 answers

1
Yuri A. Brito On

Using GL_ALPHA won't work with OpenGL 3.2+.

The first solution I've tried is to replace GL_ALPHA with GL_RED and use .r on fragment shader, where the tutorial uses .a