Sign in to follow this  
Arkanoid

Texture deformations

Recommended Posts

Arkanoid    109
I loaded a texture and create a sprite, my texture is 800x600, i set it position 0 0 and center 0 0, but the texture looking like it was increased 2-fold...it position is not 0..its like 50 50 and i can see only 1/4 of texture...why it was increased?

Share this post


Link to post
Share on other sites
Asesh    276
Are you using ID3DXSprite interface to display that texture? if yes then the coordinates of the sprite should be specified in RECT format, for example:

[code]RECT oClientRect[] =
{
{10, 10, 120, 30}, // For FPS data
{10, 30, 300, 50}, // For timer data
};[/code]

Refer to array 1: left: 10 top:10 right: 120 bottom: 30

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