DirectX - Problem with trans sprite
Hey guys, new to the forum. Anyway, I have written a program to animate a sprite with transpatency support with the help of a book. But see, I keep getting these two erros:
'D3DXSPRITE_ALPHABLEND' : undeclared identifier
'Draw' : function does not take 5 parameters
In fact, I loaded and ran the example program in the book as it is, and I still get these same errors. How can I fix this thing?
Heres the chunk of code does the drawing:
if (d3ddev->BeginScene())
{
d3ddev->StretchRect(back, NULL, backbuffer, NULL, D3DTEXF_NONE);
sprite_handler->Begin(D3DXSPRITE_ALPHABLEND);
D3DXVECTOR3 position((float)kitty.x, (float)kitty.y, 0);
sprite_handler->Draw(
kitty_image[kitty.curframe],
NULL,
NULL,
&position,
D3DCOLOR_XRGB(255,255,255));
sprite_handler->End();
d3ddev->EndScene();
}
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement