Improved unsupported texture format error
Former-commit-id: 63c12416baadd82f6b6f3fa9442034a9a18d0704
This commit is contained in:
parent
c05c22c97a
commit
f7fb7e10fb
|
|
@ -32,7 +32,7 @@ namespace
|
||||||
NzOpenGL::Format openGLFormat;
|
NzOpenGL::Format openGLFormat;
|
||||||
if (!NzOpenGL::TranslateFormat(impl->format, &openGLFormat, NzOpenGL::FormatType_Texture))
|
if (!NzOpenGL::TranslateFormat(impl->format, &openGLFormat, NzOpenGL::FormatType_Texture))
|
||||||
{
|
{
|
||||||
NazaraError("Format not supported by OpenGL");
|
NazaraError("Format " + NzPixelFormat::ToString(impl->format) + " not supported by OpenGL");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -562,7 +562,7 @@ bool NzTexture::LoadFromImage(const NzImage& image, bool generateMipmaps)
|
||||||
if (!IsFormatSupported(format))
|
if (!IsFormatSupported(format))
|
||||||
{
|
{
|
||||||
nzPixelFormat newFormat = (NzPixelFormat::HasAlpha(format)) ? nzPixelFormat_BGRA8 : nzPixelFormat_BGR8;
|
nzPixelFormat newFormat = (NzPixelFormat::HasAlpha(format)) ? nzPixelFormat_BGRA8 : nzPixelFormat_BGR8;
|
||||||
NazaraWarning("Format not supported, trying to convert it to " + NzPixelFormat::ToString(newFormat) + "...");
|
NazaraWarning("Format " + NzPixelFormat::ToString(format) + " not supported, trying to convert it to " + NzPixelFormat::ToString(newFormat) + "...");
|
||||||
|
|
||||||
if (NzPixelFormat::IsConversionSupported(format, newFormat))
|
if (NzPixelFormat::IsConversionSupported(format, newFormat))
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue