Yuri A. Brito
Yuri A. Brito

Reputation: 231

FreeType texture atlas completely white

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).

Upvotes: 0

Views: 626

Answers (1)

Yuri A. Brito
Yuri A. Brito

Reputation: 231

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

Upvotes: 2

Related Questions