Texture HELP.

Started by
5 comments, last by Axehandler 24 years ago
I took Tut6 (textured box) and decided I wanted to see the frame rates so I jumped up to the tut 13 (Bitmap fonts) I have the text working fine, placed on the screen giving me my framerates, BUT.. I decided to change textures to a simple black/white texture I made, and discovered my text force changed to black. =\ This is the code AFTER the default loading of the texture and box. glLoadIdentity(); glTranslatef(0.0f,0.0f,-1.0f); glColor3f(0.5f,0.5f,0.5f); glRasterPos2f(-0.55f, +0.35f); glPrint("FrameRate :%04d", FRate); What am I missing... HELP Axehandler
Advertisement
The only tihng that comes to mind is that the texture load is failing. Make sure you''re giving it the right path and that it''s width and height are both powers of 2.
The Texture on the cube is loading correctly, It seems like the texture color is overwriting the color I selected for the text. Doesn''t seem right at all. =(
For Alexander:

I had the same identical problem as you and the only one thing I was able to do to let the code work correctly was to call glDisable(GL_TEXTURE) before the call to glPrint and then to call glEnable(GL_TEXTURE) after it.

This tecnique works but I really don''t understand why there is this problem and I don''t know if my method is formally correct, anyway it works.....

Yea, I was looking at the disable/enable option, but it certainly seems odd that you would have to do that. =(

By The way.. it''s AXE handler not ALEXANDER =)
Still haven''t figured this problem out. aside from the work-a-round, I resampled my bmp into a 256 color since it WAS 16bit, that didn''t help. =( I figured the GL unit may be using the palette index so I re-arranged the colors only to discover that the text is forced to whatever color happens to be the "PRIMARY" color on the image.

It must be using the same color buffer that the texture is using. is there a way to change that....

Axehandler
I think it might also be Texture coordinate generation. Check that, just in case.

This topic is closed to new replies.

Advertisement