vertex format to use when drawing a D3DPT_LINELIST???

Started by
2 comments, last by GekkoCube 21 years, 1 month ago
thats my basic question. i just want to draw many line segments strung together to make one great long "path" for a moving object. trouble, things arent working. and so, i need to know if i should be using transformed or untransformed vertices for this. thanks.
Advertisement
If you are drawing lines in 3D, use untransformed. If you are drawing lines in 2D you can still use untransformed vertices, but you might want to use transformed vertices and set the RHW value explicitly.
John BoltonLocomotive Games (THQ)Current Project: Destroy All Humans (Wii). IN STORES NOW!
thanks.
but can you (or someone else) please explain why untransformed would be best for a 3d line and transformed would be best for 2d?

ill try untransformed from now on....thanks.
quote:Original post by GekkoCube
thanks.
but can you (or someone else) please explain why untransformed would be best for a 3d line and transformed would be best for 2d?


I didn''t say that transformed is best for 2D, just that it might be an option. Transformed verts must be transformed before giving them to D3D. That means you have to transform the verts into screen space in your code.

In 3D, it is usually easier and more effective to have the GPU do the transformations. In that case, you give D3D the untransformed verts and the transformations, and let the GPU do all the work.

In 2D, it might be easier to do the transformations yourself if the coordinates are already in screen space (for example). In that case, you give D3D already-transformed verts.
John BoltonLocomotive Games (THQ)Current Project: Destroy All Humans (Wii). IN STORES NOW!

This topic is closed to new replies.

Advertisement