D3DXIMAGE_INFO d3dxImageInfo; D3DXCreateTextureFromFileEx( D3D9Device, L"..\\donut.bmp", 320, // I had to set width manually. D3DPOOL_DEFAULT works for textures but causes problems for D3DXSPRITE. 384, // I had to set height manually. D3DPOOL_DEFAULT works for textures but causes problems for D3DXSPRITE. 1, // Don't create mip-maps when you plan on using D3DXSPRITE. It throws off the pixel math for sprite animation. D3DPOOL_DEFAULT, D3DFMT_UNKNOWN, D3DPOOL_DEFAULT, D3DX_DEFAULT, D3DX_DEFAULT, D3DCOLOR_COLORVALUE(0.0f, 0.0f, 0.0f, 1.0f), &d3dxImageInfo, NULL, &texture ); // Create our sprite... D3DXCreateSprite( D3D9Device, &sprite );
did that help ?