Jump to content
  • Advertisement
Sign in to follow this  

[DX9] A little problem using the Sprite

This topic is 2937 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 i try to load my image and i draw it, it appears bigger than original. I've loaded a 800x600 image, but when i display it, it too bigger!

I can't understand how can i fix it..


Uploaded with ImageShack.us

The original image:


Uploaded with ImageShack.us

This is my code:


D3DXVECTOR3 center(0.0f, 0.0f, 0.0f);
/*D3DXVECTOR3 position(300.0f, 500.0f, 0.0f);*/
D3DXVECTOR3 position(0.0f, 0.0f, 0.0f);

m_sprite->Draw(m_texture_sprite->texture, NULL, ¢er, &position, D3DCOLOR_ARGB(255, 255, 255, 0));


Thanks a lot!

Share this post

Link to post
Share on other sites
I Solved using the D3DXMatrixTransformation2D() Methods. You can find all information here: http://www.toymaker.info/Games/html/sprites.html


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.

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!