i use d3d9 to draw a animated cursor.
first i load the animated cursor frome a texture, and i create two 32*32 offscreen plain surface suf1_, suf2_.
every frame, i update the cursor rect in the texture, then
D3DXLoadSurfaceFromSurface(suf1_, 0, 0, textureSurface, 0, rect, D3DX_DEFAULT, 0);
device->SetCursorProperties(0, 0, suf2_);
std::swap(suf1_, suf2_);
but it's too slow.
so how to make it fast? any suggestion will be appreciated, thanks.