Utility: Rework PixelFormat (WIP)

Former-commit-id: 1ab609e753783d9767ba23fd4cab9390453bf729
This commit is contained in:
Lynix
2016-05-17 14:23:45 +02:00
parent c31f70af55
commit 1ebe1a8091
9 changed files with 306 additions and 561 deletions

View File

@@ -89,7 +89,7 @@ namespace Nz
if (!PixelFormat::IsConversionSupported(m_sharedImage->format, newFormat))
{
NazaraError("Conversion from " + PixelFormat::ToString(m_sharedImage->format) + " to " + PixelFormat::ToString(newFormat) + " is not supported");
NazaraError("Conversion from " + PixelFormat::GetName(m_sharedImage->format) + " to " + PixelFormat::GetName(newFormat) + " is not supported");
return false;
}
#endif
@@ -327,7 +327,7 @@ namespace Nz
std::unique_ptr<UInt8[]> colorBuffer(new UInt8[bpp]);
if (!PixelFormat::Convert(PixelFormatType_RGBA8, m_sharedImage->format, &color.r, colorBuffer.get()))
{
NazaraError("Failed to convert RGBA8 to " + PixelFormat::ToString(m_sharedImage->format));
NazaraError("Failed to convert RGBA8 to " + PixelFormat::GetName(m_sharedImage->format));
return false;
}
@@ -405,7 +405,7 @@ namespace Nz
std::unique_ptr<UInt8[]> colorBuffer(new UInt8[bpp]);
if (!PixelFormat::Convert(PixelFormatType_RGBA8, m_sharedImage->format, &color.r, colorBuffer.get()))
{
NazaraError("Failed to convert RGBA8 to " + PixelFormat::ToString(m_sharedImage->format));
NazaraError("Failed to convert RGBA8 to " + PixelFormat::GetName(m_sharedImage->format));
return false;
}
@@ -477,7 +477,7 @@ namespace Nz
std::unique_ptr<UInt8[]> colorBuffer(new UInt8[bpp]);
if (!PixelFormat::Convert(PixelFormatType_RGBA8, m_sharedImage->format, &color.r, colorBuffer.get()))
{
NazaraError("Failed to convert RGBA8 to " + PixelFormat::ToString(m_sharedImage->format));
NazaraError("Failed to convert RGBA8 to " + PixelFormat::GetName(m_sharedImage->format));
return false;
}