Skip to main content
gamedev.net
🔒 Locked

D3D projection

Started by Renny 0 replies 300+ views
Original Post
Renny
Renny
Im having trouble here gettin d3d to project properly. So far ive use a D3DTLVERTEX and given it x and y scrren coords and it renders a tri fine. As soon as i add a z component to the vertices, and use D3DLVERTEX, well, it doesnt render a thing. Im simply trying to render 1 triangle with persp. projection. Ive tried setting projection matrices, looked in the help files, spent a couple of hours TRYING to get one, single, annoying little triangle to render on my monitor, after d3d projects it for me. I set my viwport to 0,0 to 640, 480, tri vertices at (0,10,5) (20,0,10) (20,20,0), but it wont render it (will render if i tell it it is reasy transformed, ie use TLVERTEX, but thats not what i want ) Any help would be appreciated, Thanks.
rtime
rtime
you have to set the projection matrix and the view
matrix.. (i think)

and you should set the D3D-Culling Mode to CULL_NONE.
this helps you do find an error in your triangle-vertex-
order (one of my favorites )
After you see the triangle on the screen, change CULL_NONE
to CULL_(C)CW (what you prefer)... if the triangle
disappears you have to change the order or the vertices
(like ABC => ACB)

hope this helps
Torsten

Topic Locked

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

Sign in to reply to this topic.