How to change color in RGB format in FTGL OpenGL?

679 Views Asked by At

How to change color in RGB format in FTGL OpenGL?

FTGLPixmapFont font("arial.ttf");
FTPoint coord(100, 100, 0);
font.FaceSize(20);
font.Render("abc", -1 , coord);

Standart color change does not work.

glColor4f(1, 0, 0, 1);
1

There are 1 best solutions below

3
On

Use

FTGLPixmapFont font("arial.ttf");
FTPoint coord(100, 100, 0);

glPushAttrib(GL_ALL_ATTRIB_BITS);
glDisable(GL_LIGHTING);
glDisable(GL_DEPTH_TEST);

glColor4f(1, 0, 0, 1);
font.FaceSize(20);
font.Render("abc", -1 , coord);

glPopAttrib();