Advertisement

Problem with the text color

Started by November 28, 2001 06:42 PM
11 comments, last by Badone 23 years, 2 months ago
That would be NeHe''s custom print routine.

Alex Broadwin
A-Tronic Software & Design
-----
"if you fail in life, you were destined to fail. If you suceed in life, call me."
"The answer is out there."
"Please help, I''m using Windows!"
Alex BroadwinA-Tronic Software & Design-----"if you fail in life, you were destined to fail. If you suceed in life, call me.""The answer is out there.""Please help, I'm using Windows!"
Hey guys... he''s using a bitmap font, not a texture-mapped font (which is what I thought at first too, and was about to suggest GL_MODULATE as well)

That said, I have absolutely no idea what could be going awry... sorry
Advertisement
The point on texturing was right... You should ensure that you disalbe texturing, when you draw your text. Because OpenGL will take the color specified in the last glColor call and will combine it with the color of the last texture coordinate ... And I guess some implementations will take black, when there is no texture ...
Apart from that you have to ensure that the RasterPos ist on screen ... So 0,0 is a good starting point. To make the text positioning easier you could do that:

FRAME
+Set Projectionmatrix
+Set Projection for 3D objects (gluPerspective..)
+Set Modelviewmatrix
+Enable texturing ...
+draw your objects
+Set Projectionmatrix
+Set Othogonal Matrix using your screen size form 0 to width and
0 height using glOrtho.. or gluOrto2D
+Disable Texturing
+Set your color
+Set your RasterPos
+Render the text

This topic is closed to new replies.

Advertisement