PixelFormat D3D9Mappings::_getClosestSupportedPF(PixelFormat ogrePF) { if (_getPF(ogrePF) != D3DFMT_UNKNOWN) { return ogrePF; } switch(ogrePF) { case PF_B5G6R5: return PF_R5G6B5; case PF_B8G8R8: return PF_R8G8B8; case PF_B8G8R8A8: return PF_A8R8G8B8; case PF_SHORT_RGB: return PF_SHORT_RGBA; case PF_FLOAT16_RGB: return PF_FLOAT16_RGBA; case PF_FLOAT32_RGB: return PF_FLOAT32_RGBA; case PF_UNKNOWN: default: return PF_A8R8G8B8; } }
//--------------------------------------------------------------------- PixelFormat D3D11Mappings::_getClosestSupportedPF(PixelFormat ogrePF) { if (_getPF(ogrePF) != DXGI_FORMAT_UNKNOWN) { return ogrePF; } switch(ogrePF) { case PF_FLOAT16_RGB: return PF_FLOAT16_RGBA; case PF_FLOAT32_RGB: return PF_FLOAT32_RGBA; case PF_UNKNOWN: default: return PF_A8B8G8R8; } }