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

Started by
2 comments, last by Florian Nentwich 22 years, 10 months ago
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!
Advertisement
Disable texturing before drawing the untextured object.

Resist Windows XP''s Invasive Production Activation Technology!
http://druidgames.cjb.net/ (If my website isn''t down, it''s a miracle!)
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?
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!)

This topic is closed to new replies.

Advertisement