D3DXSPRITE_ALPHABLEND undeclared identifier?

Started by
7 comments, last by Pipo DeClown 19 years, 5 months ago
hello gamedev! I would like to ask why it causes error each time I put D3DXSPRITE_ALPHABLEND in my begin parameters. This is the error: C:\projects\sprite2\main.cpp(83) : error C2065: 'D3DXSPRITE_ALPHABLEND' : undeclared identifier
Flamers are worst than Newbies
Advertisement
Did you remember to include d3dx9.h?

edit - Also, do you have the correct version of DirectX SDK installed?
yes I did include the header but I'm using an old version of dx9. could this be the problem? If so, what version of sdk should I install?
Flamers are worst than Newbies
I would install the latest version - Summer Update 2004
No, no, no. I think, it has nothing to do with your version of dx9. The error has to be elsewhere but actually I don't know where [smile].
[qoute]
No, no, no. I think, it has nothing to do with your version of dx9. The error has to be elsewhere but actually I don't know where .
[/qoute]

the weird thing is even the downloaded codes in codesampler.com has the same errors when I compiled it.

this are the errors I got in the code I got in codesampler.com which has the same error in every sourcecodes I got in codesampler :(

--------------------Configuration: dx9_d3dxsprite - Win32 Debug--------------------
Compiling...
dx9_d3dxsprite.cpp
c:\downloads\game\dx9_d3dxsprite\dx9_d3dxsprite\dx9_d3dxsprite.cpp(361) : error C2065: 'D3DXSPRITE_ALPHABLEND' : undeclared identifier
c:\downloads\game\dx9_d3dxsprite\dx9_d3dxsprite\dx9_d3dxsprite.cpp(367) : error C2660: 'Draw' : function does not take 5 parameters
Error executing cl.exe.

dx9_d3dxsprite.obj - 2 error(s), 0 warning(s)

I'm sure the function call is right but, I don't know what caused this errors :(
Flamers are worst than Newbies
Yes it is the version. The versions beyond 9.0(a) have the updated ID3DXSprite, but it's of course smart to get the latest which is the october 2004 update. (That's version 9.0c)
  I took a look at the source code and it seems to be OK. Maybe it really has to do with version of dx9. I would like to find it out but I just now reinstalled OS, so I can't.
  I think you should try to find D3DXSPRITE_ALPHABLEND in d3d9.h or d3dx9.h. If it is really something with version of dx9, it will not be there.

Btw., double post? [smile]
Quote:Original post by RiBi
I took a look at the source code and it seems to be OK. Maybe it really has to do with version of dx9. I would like to find it out but I just now reinstalled OS, so I can't.
I think you should try to find D3DXSPRITE_ALPHABLEND in d3d9.h or d3dx9.h. If it is really something with version of dx9, it will not be there.

Btw., double post? [smile]


Nice try, but there's REALLY no need. The ID3DXSprite interface was updated with those features since 9.0b.

This topic is closed to new replies.

Advertisement