I've an image loaded in 32 bit rgba format. But DirectX9 requires an argb texture format. What is the best way to convert my image data to this format?
I've tried to use D3DFMT_A8R8G8B8 directly, but in this case my color values are changed and my texture appears blue. If I use D3DFMT_A8B8G8R8 instead,
I get in trouble because the returned surface format is D3DFM_A8R8G8B8 instead of my requested format. So I've to iterate over each pixel and bring it to the
correct pixel format. But this is a huge bottleneck on large images and not usable.
How would you handle this missmatch? Is there a faster way to convert those pixel colors?