FTGL color issues

Started by
3 comments, last by danamite 14 years, 1 month ago
I begun using FTGL for 6-7 days and I can't figure out how to change color. I use OpenGL, but glColor functions don't work. Default color is white and i couldn't change it.
Advertisement
I solved the problem. For those who have the same problem, usage of FTGLTextureFont instead of FTGLPixmapFont is the solution. But when using FTGLTextureFont, you don't have direct access to the screen coordinates.
I'm not quite sure if there's any mind in replying to such an old thread, but I found a solution to colouring the FTGLPixmapFont;

//to render black textglPixelTransferf(GL_RED_BIAS, -1.0f);glPixelTransferf(GL_GREEN_BIAS, -1.0f);glPixelTransferf(GL_BLUE_BIAS, -1.0f);font.Render("Some text.");//Dark red textglPixelTransferf(GL_RED_BIAS, -0.5f);glPixelTransferf(GL_GREEN_BIAS, -1.0f);glPixelTransferf(GL_BLUE_BIAS, -1.0f);font.Render("Some text.");


May help someone if anyone else is fighting with this issue.(1st page Google)
Doesn't matter how much you lose as long as you make sure the winner loses enough blood.
Quote:Original post by Rakshasa
I'm not quite sure if there's any mind in replying to such an old thread, but I found a solution to colouring the FTGLPixmapFont;

//to render black textglPixelTransferf(GL_RED_BIAS, -1.0f);glPixelTransferf(GL_GREEN_BIAS, -1.0f);glPixelTransferf(GL_BLUE_BIAS, -1.0f);font.Render("Some text.");//Dark red textglPixelTransferf(GL_RED_BIAS, -0.5f);glPixelTransferf(GL_GREEN_BIAS, -1.0f);glPixelTransferf(GL_BLUE_BIAS, -1.0f);font.Render("Some text.");


May help someone if anyone else is fighting with this issue.(1st page Google)


Thanks, that was very helpful and friendly.
[size="2"]I like the Walrus best.
I'm having the same problem. The text is usually the same color as some other object recently rendered, or white before anything else has been rendered. glColorf and glPixelTransferf aren't coloring the pixmap text predictably. Other primitives rendered in place of the text are colored correctly.

This topic is closed to new replies.

Advertisement