2D text color problem

Started by
3 comments, last by TinyGameDev 18 years, 10 months ago
How come I can't chagne the color with which I render the text, but everything else changes color? Here's my code: GLUT glut = new GLUT(); int font = GLUT.BITMAP_HELVETICA_18; gl.glColor3f(0,1,1); gl.glRasterPos3f(10, 20, 0); glut.glutBitmapString(gl, font, "Text"); The text is black in the upper left corner but everything else get a greenish layer on top. What am I doing wrong?? Thanx

Making Terralysia, wishlist now on Steam <3!

Advertisement
Well, just a guess, but perhaps you have texturing enabled when you render the text?
ah yeah, i have...i guess that's not good??

Making Terralysia, wishlist now on Steam <3!

That means the whole text will be textured using whatever texture coordinate was set before the call to glRasterPos. Try disabling texturing before rendering the bitmap text :)
cool..thanx a lot..works perfect now :)

Making Terralysia, wishlist now on Steam <3!

This topic is closed to new replies.

Advertisement