Sprite Draw Problem
What may cause an INVALIDCALL err from a Sprite->Draw?
The texture and the sprite are created with no problems, and the draw call is invoked withing Begin/End pair.
Any ideas?
Thanks.
Check to see if the file is in the right location. I think I had to move my own file around when I had that error. If you checked that, next step is to look at this function: D3DXCreateTextureFromFileEx(); Most errors I've seen happen if this function is done incorrectly. For example, my own class contains the following:
D3DXCreateTextureFromFileEx(pd3dDevice, spritePath, spriteWidth,
spriteHeight, 1, 0, D3DFMT_UNKNOWN, D3DPOOL_MANAGED, D3DX_DEFAULT, D3DX_DEFAULT, 255, NULL, NULL, &spriteTexture);
D3DXCreateTextureFromFileEx(pd3dDevice, spritePath, spriteWidth,
spriteHeight, 1, 0, D3DFMT_UNKNOWN, D3DPOOL_MANAGED, D3DX_DEFAULT, D3DX_DEFAULT, 255, NULL, NULL, &spriteTexture);
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement