use ref for HDR_FORMAT to avoid static order

This commit is contained in:
Stephen Birarda 2018-04-10 15:42:42 -07:00
parent d8f0cfa89a
commit 016a6dcd84

View file

@ -37,7 +37,9 @@ bool DEV_DECIMATE_TEXTURES = false;
std::atomic<size_t> DECIMATED_TEXTURE_COUNT{ 0 };
std::atomic<size_t> RECTIFIED_TEXTURE_COUNT{ 0 };
static const auto HDR_FORMAT = gpu::Element::COLOR_R11G11B10;
// we use a ref here to work around static order initialization
// possibly causing the element not to be constructed yet
static const auto& HDR_FORMAT = gpu::Element::COLOR_R11G11B10;
static std::atomic<bool> compressColorTextures { false };
static std::atomic<bool> compressNormalTextures { false };