seeing my rotating mesh behind white garble?

Started by
3 comments, last by billybob 21 years, 9 months ago
i am trying to render my first loaded .x file, but i can see a few white dots, and then my mesh rotating in the white dots. this is extremely annoying, as i can see my program working, yet this crap in the way. i have tried disabling the zbuffer, moving the camera around, moving it around, turning off texturing, turning of texture filtering, nothing helps. any idea what this is?
Advertisement
ok, i found out that clearing the zbuffer after every frame makes it completley go away - along with my mesh. what the hell is going on? i''m 99% sure its some kind of zbuffer thing, but clearing it doestn'' help, nor does disabling it.
Can you post your initialization code and set render states if any? I''ve had a few problems similar to yours that all came from initial creation parameters that were set wrong.

---
My Site
Come join us on IRC in #directxdev @ irc.afternet.org
i fixed it, but the fix is very confusing. i have to clear the zbuffer to 1 not zero. does this mean i''m doing something backwards or something? i didn''t know that was possible!!
Clearing it to one is correct. Basically, 1.0 is the end of the world. Anything drawn on top of it is drawn. 0.0 is the front and anything drawn is not drawn. Hope it makes sense. Refer to the SDK for more details.

This topic is closed to new replies.

Advertisement