Jump to content
  • Advertisement
Sign in to follow this  
guillotine

Flipping ID3DXSPRITE horizontally

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

how to flip a sprite in Direct3d using ID3DXSPRITE? I searched around the net and i found a very easy way in DX8, but that won't work in DX9. Also i have another question. I scaled the sprites and i noticed they look sligthly filtered, with a tiny grey area around the sprite. It's not a big deal, but i was wondering if it was possible to show them unfiltered or something.

Share this post


Link to post
Share on other sites
Advertisement
Create an identity matrix and then modify the following two elements:

new_matrix._11 = -1;
new_matrix._41 = sprite_width;

Then use it with ID3DXSprite::SetTransform(). If you've already had a transform set you'll need to multiply the old matrix by this matrix.

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!