Jump to content

  • Log In with Google      Sign In   
  • Create Account

Texture HELP.


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
6 replies to this topic

#1 Axehandler   Members   -  Reputation: 122

Like
Likes
Like

Posted 11 April 2000 - 01:44 PM

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

Sponsor:

#2 TheHoff   Members   -  Reputation: 122

Like
Likes
Like

Posted 11 April 2000 - 02:18 PM

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.

#3 Axehandler   Members   -  Reputation: 122

Like
Likes
Like

Posted 11 April 2000 - 02:21 PM

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. =(

#4 Magallo   Members   -  Reputation: 122

Like
Likes
Like

Posted 12 April 2000 - 02:18 AM

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.....



#5 Axehandler   Members   -  Reputation: 122

Like
Likes
Like

Posted 12 April 2000 - 04:53 AM

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 =)

#6 Axehandler   Members   -  Reputation: 122

Like
Likes
Like

Posted 13 April 2000 - 06:12 AM

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

#7 teenytim   Members   -  Reputation: 122

Like
Likes
Like

Posted 13 April 2000 - 07:40 AM

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




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS