Jump to content
  • Advertisement
Sign in to follow this  
Roble

ID3DXSprite help

This topic is 5136 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

I am getting these errors: C:\Program Files\Microsoft Visual Studio\MyProjects\Game\main.cpp(115) : error C2065: 'ID3DXSprite' : undeclared identifier C:\Program Files\Microsoft Visual Studio\MyProjects\Game\main.cpp(115) : error C2065: 'pSprite' : undeclared identifier C:\Program Files\Microsoft Visual Studio\MyProjects\Game\main.cpp(115) : error C2106: '=' : left operand must be l-value C:\Program Files\Microsoft Visual Studio\MyProjects\Game\main.cpp(117) : error C2065: 'D3DXCreateSprite' : undeclared identifier But the code I used was: ID3DXSprite *pSprite = NULL; if(FAILED(D3DXCreateSprite(g_pD3DDevice, &pSprite))) { // Error } So what's up?

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by Tertsi
and also replace this: ID3DXSprite *pSprite

with:
LPD3DXSPRITE Sprite;


Same thing


LPD3DXSPRITE is a typedef for a ID3DXSprite pointer.

And Roble: you must be already including d3d9.h, but to use any of d3dx (notice the x) functions or interfaces (everything that starts with either ID3DX or D3DX) you need to include the direct3d extention library - d3dx9.h

Also, including d3dx9.h automatically includes d3d9.h anyways...

Share this post


Link to post
Share on other sites
Thanks guys! It turns out that I forgot to include some pretty crucial lib files. And yeah, I know that LPD3DXSPRITE and ID3DXSPRITE are interchangeable, that's just the one I chose. :p

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!