Problems with edges of 3D triangles...

Started by
1 comment, last by MePHyst0 18 years, 1 month ago
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 =/\=.
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 ?)
There is nothing that can't be solved. Just people that can't solve it. :)
I agree with DesignerX, try the approach he mentioned.
However, I think it might be just a matter of low resolution/turned off antialiasing.

This topic is closed to new replies.

Advertisement