ThePentiumGuy Posted March 15, 2004 Posted March 15, 2004 hey, i created a mesh program thingy, the only way i got it to work was if i changed: D3Ddev.Clear(ClearFlags.Target Or ClearFlags.ZBuffer, Color.FromArgb(0, 20, 0), 0, 0) to D3Ddev.Clear(ClearFlags.Target Or ClearFlags.ZBuffer, Color.FromArgb(0, 20, 0), 1, 0) that argument(Changing from 0 to 1) is the ZDepth, does anyone know what this argument does? Becuase if it was 0, the mesh wouldnt be displayed at all Quote My VB.NET Game Programming Tutorial Site (GDI+, Direct3D, Tetris [coming soon], a full RPG.... you name it!) vbprogramming.8k.com My Project (Need VB.NET Programmers) http://workspaces.gotdotnet.com/ResolutionRPG
Kavan Posted March 15, 2004 Posted March 15, 2004 That is the value you initialize z-buffer with. It ranges typically from 0 (front) to 1 (back). It is used internally to determine if the new stuff should be rendered. It is rendered only if its depth is closed to camera than z-values already in the z-buffer. So when you set it to 0 you effectively said that there is a plane right in front of the camera meaning that nothing behind it could be seen. Quote
ThePentiumGuy Posted March 15, 2004 Author Posted March 15, 2004 thanks alot man, i just figured it out thru trial right when you posted :p but thanks for the reply tho :-) Quote My VB.NET Game Programming Tutorial Site (GDI+, Direct3D, Tetris [coming soon], a full RPG.... you name it!) vbprogramming.8k.com My Project (Need VB.NET Programmers) http://workspaces.gotdotnet.com/ResolutionRPG
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.