Sign in to follow this  
quaker

Sprite Draw Problem

Recommended Posts

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.

Share this post


Link to post
Share on other sites
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);

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this