vincentnl
Active member
Hiya,
Here is my question :
I loaded the bitmap using
D3DXCreateTextureFromResource(g_pd3dDevice,NULL,(LPCSTR) IDB_SPRITES,&g_pSmileysTex);
After that I used a sprite to draw.
HRESULT test=g_pSprite->Draw( g_pSmileysTex,
&srcRect,
&vScaling,
&vRotationCenter,
0.0f,
&vTranslation,
D3DCOLOR_COLORVALUE(1.0f,1.0f,1.0f,1.0f) );
I created a rectanglearea to sprite of 20 by 20 and the bitmap is 20 by 120 (kind of like frames on a row)
Unfortunatly, the sprite is displayed too small ! it cuts a bit of the bottom and top ? How can the texture size change after loaded into the device?
tx
vincent
Here is my question :
I loaded the bitmap using
D3DXCreateTextureFromResource(g_pd3dDevice,NULL,(LPCSTR) IDB_SPRITES,&g_pSmileysTex);
After that I used a sprite to draw.
HRESULT test=g_pSprite->Draw( g_pSmileysTex,
&srcRect,
&vScaling,
&vRotationCenter,
0.0f,
&vTranslation,
D3DCOLOR_COLORVALUE(1.0f,1.0f,1.0f,1.0f) );
I created a rectanglearea to sprite of 20 by 20 and the bitmap is 20 by 120 (kind of like frames on a row)
Unfortunatly, the sprite is displayed too small ! it cuts a bit of the bottom and top ? How can the texture size change after loaded into the device?
tx
vincent