Jump to content
  • Advertisement

Archived

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

pcvsee

world transformation in DX8?

This topic is 6341 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

when you use SetTransform in D3D in order to set the world matrix, does the matrix transforms all the vertices that will be rendered until a new world matrix is initialized again or does it only affect one vertex?

Share this post


Link to post
Share on other sites
Advertisement
As i know world matrix affects all vertices until new world matrix is set (i learned it today so i don''t know much).

Share this post


Link to post
Share on other sites
If you draw more than one vertex at a time, this is what happens when you call DrawPrimitive:

  • average all the vertices you are about to draw and position them at the origin
  • apply the current (the one from when it was last set) world matrix*view matrix*projection matrix to each vertex
  • Draw the resulting vertices as D3DFVF_XYZRHW vertices


So when you call SetTransform, D3D has to reconcatenate the world, view and projection matrices.

Until you set a new world matrix, all vertices are transformed by it.



Just because you''re outnumbered doesn''t mean you''re wrong.


sharewaregames.20m.com

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!