Archived

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

SGreth

OpenGL Help with OpenGL texturing...

Recommended Posts

Here is my situation... I''m drawing a quad with a texture on it and then some text (from a text library) on top of it. The first pass works just fine, but for some reason the second time around when I go to render the quad with the texture on it, it won''t show the texture, instead it renders the poly''s with whatever the current color is set to. What state do I need to enable/disabe???? Thanks, ~S''Greth

Share this post


Link to post
Share on other sites
Yeah, I do have it on...any other suggestions. Basically, how can I turn *OFF* vertex coloring all together so that I can guarantee that I''m only working with textures when it comes to the final color put into the display buffer?

Thanks again,
~S''Greth

Share this post


Link to post
Share on other sites
Make sure that the unsigned int that is your texture object is static.... unless its global of course, your texture could be being deleted when it hops out of the rendering loop if its not.

Share this post


Link to post
Share on other sites
This is probably a silly answer, but are you making sure that you''re binding the texture you want for the polygon before you render it for each frame? It''s possible that this library binds the default texture (0) after it''s done, and if you''re not re-binding the texture you want for each frame, it won''t show up. Otherwise...I have no idea what the problem might be.

Share this post


Link to post
Share on other sites
This may help, ''cause it stumped me for a while:

If you set a poly colour to, say green (0.0,1.0,0.0), when you render that poly with a texture, only the green component will show up. If there is no green, the poly will not appear right. At all.

Hope that helps

Share this post


Link to post
Share on other sites