Advertisement Jump to content
Sign in to follow this  
mrbreakit

Modifiying 2D Vertices with a World Matrix

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

I am setting the world matrix and it just doesnt have any effect on the vertices that I am rendering. I am using 2D vertices with the following format: struct Vertex { float x, y, z, rhw; unsigned long diffuse; float tu, tv; }; My matrices work fine because I can manually multiply the vertices before I call DrawPrimitive() and everything is drawn correctly. Do world matrices work for 2D vertices?

Share this post


Link to post
Share on other sites
Advertisement
Since you have a rhw member, those are Transformed vertices and as such bypass the transformation phase.

You can either do the transformation yourself (Locking and Unlocking your VB) or switch to an Orthographic view.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!