Jump to content
Xtreme .Net Talk

Recommended Posts

Posted (edited)

In my code I tried to make a sphere mesh and render it. The mesh draws almost, but you can see through it into the background color, and the pattern I see on it changes every time. (Which I find even more strange) Can someone help? (Code Attached)

 

Also, When I add References, I have several versions of the Directx libraries on my system. (1.02902) , (1.0900), ect. What do these mean?

 

Thanks!

Edited by mutant
  • *Experts*
Posted

You are not clearing your depth buffer, which is essential to draw the right pixels on your screen.

Use these clear flags in your Device.Clear() method call:

ClearFlags.Target | ClearFlags.ZBuffer

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...