Jump to content
  • Advertisement
Sign in to follow this  
e-milio

Problems with edges of 3D triangles...

This topic is 4615 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, i'm starting a D3D device with Direct X 9.0, basically i'm using with HAL a software vertex processing, D3DFMT_X8R8G8B8 for the back buffer and D3DFMT_D16 for the z-Buffer, then i'm just trying to draw over a vertex buffer, that store a simple 3D coordinates triangle in front of my camera position [DrawPrimitive(D3DPT_TRIANGLELIST, 0, 1)]... so my results are in the next link to the JPG image: http://webdelasangre.webcindario.com/TriangleZOOM.jpg I don't know why the 2 lateral edges of the triangle look like this capture (to make it out better i applied a zoom to the image)... Can you help me giving me a clue to solve the problem??? I've tried a lot of things... first i think may be was a problem with the z-buffer because of this disappearing pixels, but then i looked the code where i can't see anything wrong (although i know I'm a totally beginner...): ... EnableAutoDepthStencil = true; ... ... SetRenderState(D3DRS_ZENABLE, true); ... For each frame, before BeginScene, i always clean the z-buffer... Clear(0, NULL, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER, 0xffffffff, 1.0f, 0); ... ... so i hope you can help me, thanks a lot just for reading here!!!, bye, e-milio =/\=.

Share this post


Link to post
Share on other sites
Advertisement
Can you post more of your code ?
Try also using the REF flag when creating your device , It might be a driver problem with your video card (which card do you have ?)

Share this post


Link to post
Share on other sites
I agree with DesignerX, try the approach he mentioned.
However, I think it might be just a matter of low resolution/turned off antialiasing.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!