• Advertisement

Archived

This topic is now archived and is closed to further replies.

Texture HELP.

This topic is 6494 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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. =(

Share this post


Link to post
Share on other sites
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.....

Share this post


Link to post
Share on other sites
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 =)

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
I think it might also be Texture coordinate generation. Check that, just in case.

Share this post


Link to post
Share on other sites

  • Advertisement