http://i453.photobucket.com/albums/qq253/ulti-killer/player.png~original
I try to blend the character into game but I still cannot remove the blue color in the sprite sheet and discover that the white area of sprite is semi-transparent. How should I do to remove the blue color of the sprite sheet?
void initPlayer()
{
// Create texture.
hr = D3DXCreateTextureFromFileEx(d3dDevice, "player.png", 169, 44,
D3DX_DEFAULT, NULL, D3DFMT_A8R8G8B8, D3DPOOL_MANAGED,
D3DX_DEFAULT, D3DX_DEFAULT, D3DCOLOR_XRGB(0, 255, 255),
NULL, NULL, &player);
}
void renderSprite()
{
// Specify alpha blend will ensure that the sprite will render the background with alpha.
sprite->Begin(D3DXSPRITE_ALPHABLEND);
sprite->Draw(player, &playerRect, NULL, &D3DXVECTOR3(playerDest.X, playerDest.Y, 0),D3DCOLOR_XRGB(25 5, 255, 255));
// End sprite drawing
sprite->End();
}