I am working on a c++ project dealing with 2D animations involving high resolution png pictures. I want the program to be compatible with all popular windows editions: XP, Vista, 7, and 8.
The first thing I’ve tried is the legacy GDI/GDI+, with which the animations cannot run smoothly. Besides, they are said to be abandoned in the future.
Then I examined DirectX. The D2D looks tempting but not supported by XP. Its predecessor DirectDraw is a legacy stuff to be abandoned. The D3D in DX9.0 is said to be able to work with 2D. I followed the instruction on a webpage to draw pictures with Direct3D Sprites. The pictures, however are disproportionate. I debug it the whole night only to find textures are automatically scaled to make height and width some power of 2 (DX is completely new to me 🙁 ). I don’t want the scale.
I am not sure whether it is correct that D2D utilizes the D3D interface. If so, I think there must be some better ways to use D3D for 2D application. But I cannot find it. So please help me.
DirectX 9 can handle non power of two textures, see here
So it should not be a problem to use DirectX 9 at all.
Otherwise you can also look at OpenGL.