Sprite Draw Problem

Started by
2 comments, last by Evil Steve 18 years ago
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.
Advertisement
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);
I guess so

Install the debug D3D runtimes. That'll tell you exactly what's wrong.

This topic is closed to new replies.

Advertisement