Sign in to follow this  
guillotine

Flipping ID3DXSPRITE horizontally

Recommended Posts

guillotine    126
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
SiCrane    11839
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this