ID3DXSprite help
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?
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...
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement