Recommended Posts

I''m using DX8.0 to do a 2d game and I''m using the ID3DXSPRITE interface to draw sprites.
I used to load the textures with D3DXCreateTextureFromFileEx and all worked fine.
The problem arises with animated sprites: After I saved the frames on one bitmap I followed these steps:
1)Create a Surface with IDirect3DDevice8::CreateImageSurface.
2)Load the bitmap on the surface with D3DXLoadSurfaceFromFile.
3)Create a texture for each frame on the image with D3DXCreateTexture.
4)Retrieve the surface of the texture with GetSurfaceLevel and copy part of the big surface to this surface using IDirect3DDevice8::CopyRects.
This works, but I''ve lost the ColorKey capabilities, that D3DXCreateTextureFromFileEx offered!
The problem is that D3DXCreateTexture doesn''t give the possibility to specify a D3DCOLOR ColorKey..
Is there any way to solve this problem with ID3DXSPRITE or do I have to abandon this interface?
Thanks for any help!