|
-
Oct 27th, 2002, 03:07 PM
#1
Thread Starter
Fanatic Member
Direct 3d...
Hello,
I have four triangles forming two squares, one square is in front of the other.
When I rotate the world, so that the square that was in front of the other is now (should be) the one who is back, it gets weird, the square that was in front first is still in front! But, the square is much smaller than the other.
How should I deal with this?
I have tried with using
d3ddev->SetRenderState( D3DRS_ZENABLE,D3DZB_TRUE);
but it only crashes the computer
-
Oct 27th, 2002, 05:57 PM
#2
Frenzied Member
You have to create your device with a zbuffer:
Code:
d3dpp.EnableAutoDepthStencil = 1
d3dpp.AutoDepthStencilFormat = D3FMT_D16
You can then enable the ZBuffer (as you were trying to do above.
Z.
-
Oct 28th, 2002, 03:40 PM
#3
Thread Starter
Fanatic Member
OK!
I have done a cube with a triangle strip, else the texture would get wrong, but I can't manage to make the top and bottom of the cube...
Should I render them as an other object?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|