Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

GekkoCube

vertex format to use when drawing a D3DPT_LINELIST???

This topic is 5649 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!