DirectX - Texture Drawing Problem

I'm learning and trying 2D games development with DirectX and i'm having a little problem.

I've managed to read, create and draw textures with the types:
1
2
3
4
 LPDIRECT3DDEVICE9 // for the D3D Device, 
 LPDIRECT3DTEXTURE9 // for textures, 
 LPD3DXSPRITE // for the Sprite used to draw the textures, 
 D3DXVECTOR3 // for X, Y and Z position  

And the functions:
1
2
3
4
5
6
7
8
9
10
11
12
 D3DXCreateTextureFromFile( LPDIRECT3DDEVICE9 pDevice,LPCTSTR pSrcFile, 
                           LPDIRECT3DTEXTURE9 *ppTexture ) // to create the textures,

 D3DXCreateSprite(LPDIRECT3DDEVICE9 pDevice, LPD3DXSPRITE *ppSprite) // to create the Sprites,

 Begin(DWORD flags) // to start drawing the sprite,

 Draw( LPDIRECT3DTEXTURE9 pSrcTexture, CONST RECT *pSrcRect, D3DXVECTOR3 *center,
       CONST D3DVECTOR3 *pTranslation,  D3DCOLOR Color ) // to draw the sprite with a texture
// and other specifications,

 End() // to finish drawing the sprite. 

I'm calling the Begin, Draw and End functions between the BeginScene() (which goes after a Clear function) and EndScene() (which is followed by a Present function).

Everything is working fine, except for a little problem. The textures are being drawed bigger than their actual size. I'm not using any scale or matrix to change the textures size/position in the sprite drawing function, like described below:

 
     pSprite->Draw( pTexture, NULL, NULL, &pPosition, 0xFFFFFFFF );


If you know the solution for this problem (or what i've might done wrong), i'd be thankful if you share it here.
I've got the solution, thanks to Lux at the Planet Chili Forum.

Link to forum: http://www.planetchili.net/forum/

Link to topic with solution: http://www.planetchili.net/forum/viewtopic.php?f=3&t=1760
Topic archived. No new replies allowed.