Warn about unknown pixel format instead of throwing
This commit is contained in:
parent
ac436cb155
commit
cc7135a0f4
1 changed files with 4 additions and 1 deletions
|
|
@ -1,6 +1,8 @@
|
||||||
#include <psemek/gfx/pixel.hpp>
|
#include <psemek/gfx/pixel.hpp>
|
||||||
#include <psemek/util/to_string.hpp>
|
#include <psemek/util/to_string.hpp>
|
||||||
|
|
||||||
|
#include <psemek/log/log.hpp>
|
||||||
|
|
||||||
namespace psemek::gfx
|
namespace psemek::gfx
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
@ -70,7 +72,8 @@ namespace psemek::gfx
|
||||||
case gl::COMPRESSED_SIGNED_RED_RGTC1: return 1;
|
case gl::COMPRESSED_SIGNED_RED_RGTC1: return 1;
|
||||||
};
|
};
|
||||||
|
|
||||||
throw std::runtime_error(util::to_string("unknown pixel format: 0x", std::hex, internal_format));
|
log::warning() << "Unknown pixel format: 0x" << std::hex << internal_format;
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue