Skip to main content
gamedev.net
🔒 Locked

DrawPrimitve

Started by Zeblar Nagrim Apr 19, 2001 at 9:16 AM 7 replies 550+ views
Original Post
Zeblar Nagrim
Zeblar Nagrim
I can clear see the triangles in my object when I render! How can I fix this problem? Here is little more info: * Object is a self made, very simple, stair with 8 steps. Every step have 4 triangels (2 for front-quad and 2 for the top-quad). * I use 1 point ligtht, that moves with the camera. * I store the object in a vertexbuffer, transform the WORLD matrix and render the object with DrawPrimitive D3DPT_TRIANGLELIST. I render 2 primitives at once (render 2 primitives, switch texture and render 2 more). The strange thing is If I render a object with more then 2 triangels in one call, like this, device->DrawPrimitive( D3DPT_TRIANGLELIST, 0, all ); the 2 triangles that made up a quad dosen´t be visible. But If I draw the object with many calls with diffrent start index, like this: for(int i=0; iDrawPrimitive( D3DPT_TRIANGLELIST, 6*i, 2 ); the quads 2 triangels is visible! Zeblar Nagrim, Lord of Chaos
Zeblar Nagrim
Zeblar Nagrim
How can I fix this problem? My quad look like two triangles! I think it is a light problem. My normals are OK. When I change the shade mode to D3DSHADE_FLAT the quad looks good on short distance but not on long distance. I have also tried to split up the quad in 4 smaller pices but the "triangle-look" still exist.

Pleeeeeasse help!
Landsknecht
Landsknecht
It looks to me like you are flat shading the stairs. Are you changing the shading method at all? Maybe by accident?

Landsknecht
My sig used to be, "God was my co-pilot but we crashed in the mountains and I had to eat him..."
But folks whinned and I had to change it.
CpMan
CpMan
Just a hunch, maybe it won''t make any difference, but try to play around with the ordering of the vertices in each quad.
VSEDebug Visual Studio.NET Add-In. Enhances debugging in ways never thought possible.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.