I am loading a texture which is 458 x 50 pixels and drawing it as part of the HUD using Direct3D sprites.
However it seems to be scaling the sprite up a bit. Is this because of the texture size? Does it need to be a factor of 2?
This is the code I am using to draw the sprite:
if(g_pSprite->Begin(D3DXSPRITE_ALPHABLEND) == D3D_OK)
{
D3DXVECTOR3 pos;
pos.x = (float)((SCREEN_WIDTH / 2) - 229);
pos.y = (float)SCREEN_HEIGHT - 60.0f;
pos.z = 0.0f;
g_pSprite->Draw(g_pTexture, NULL, NULL, &pos, 0xFFFFFFFF);
g_pSprite->End();
}
The above code should centre the sprite, however it does not. Also, part of the sprite is being cut off by the bottom of the screen, but this shouldn't happen if it is 50 pixels high.