FTGL color issues
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.
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;
May help someone if anyone else is fighting with this issue.(1st page Google)
//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)
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.
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
Popular Topics
Advertisement