Archived

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

Florian Nentwich

Texture with black background -> other polygons black too !?!?

Recommended Posts

I''ve combined the lessons 5 and 6 and created a pyramid and a textured cube. The cube appears and rotates correctly but the pyramid doesn''t show up. I know it''s there because if I move it in front of the cube, the cube disappears. The only thing is that the four polygons are all black, although I used the code from the tutorial (with the glColor3f functions). Is there something I''ve missed or forgot to think about? Please help me!

Share this post


Link to post
Share on other sites
Thanks, it works now!
It looks to me that it is better to draw the untextured polygons, then activate texturing, draw the textured polygons and then deactivate texturing (than mixing all the time)... Is that right?

Share this post


Link to post
Share on other sites
Yes, do things in batches, try to have as few state changes as possible in time critical areas of your code. If you leave texturing enabled while drawing untextured polygons, they''ll use the last texture coordinate of the last texture bound for every vertex, making them come out as a single color.

Resist Windows XP''s Invasive Production Activation Technology!
http://druidgames.cjb.net/ (If my website isn''t down, it''s a miracle!)

Share this post


Link to post
Share on other sites