Jump to content
  • Advertisement
Sign in to follow this  
DeepPurple25

Trouble with D3DXSPRITE_ALPHABLEND and Draw()

This topic is 4438 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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. Why am I getting these 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(); }

Share this post


Link to post
Share on other sites
Advertisement
Which version of the DXSDK do you have installed? The ID3DXSprite interface has undergone some changes over the years, so it is quite possible that you are using a version different that the book was written with.

For the current revision of the DXSDK though, that code does look ok.

Share this post


Link to post
Share on other sites
Quote:
Original post by DeepPurple25
Well, I am using DirectX9b. Am I suppose to use DirectX9c?

Yea, DX9b is pretty old. I would recommend upgrading to a newer SDK.

Share this post


Link to post
Share on other sites
Damn it. I upgraded DirectX and it doesn't compile at all. I installed the
"Microsoft DirectX 9.0 SDK (Summer 2004)" version of DX into my computer. The directory is:

"C:\ProgramFiles\Microsoft DirectX 9.0 SDK (Summer 2004)"

and the error I get sais that the "d3d9.h" is unidentified, meaning it cant find the DX library. So where should I move the whole DX library to? and should I rename it?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!