0

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);
ForceBru
  • 43,482
  • 10
  • 63
  • 98
gotostereo
  • 37
  • 1
  • 7

1 Answers1

0

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();
Loreno Heer
  • 329
  • 5
  • 12
  • @gotostereo ohh, I see the problem: Use FTGLTextureFont instead of FTGLPixmapFont – Loreno Heer Jan 26 '15 at 16:29
  • Please write a simple example of how to display text on the screen through FTGLPixmapFont, on the same principle did not work. – gotostereo Jan 26 '15 at 18:13
  • @gotostereo see this here if you want to get it working with FTGLPixmapFont: http://www.gamedev.net/topic/503844-ftgl-color-issues/ – Loreno Heer Jan 26 '15 at 19:45