diff --git a/src/Magnum/GL/Context.cpp b/src/Magnum/GL/Context.cpp index fe514bb0e..83b6c06d1 100644 --- a/src/Magnum/GL/Context.cpp +++ b/src/Magnum/GL/Context.cpp @@ -464,7 +464,8 @@ Context::Context(NoCreateT, Utility::Arguments& args, Int argc, const char** arg .parse(argc, argv); /* Decide whether to display initialization log */ - _displayInitializationLog = !(args.value("log") == "quiet" || args.value("log") == "QUIET"); + if(!(args.value("log") == "quiet" || args.value("log") == "QUIET")) + _internalFlags |= InternalFlag::DisplayInitializationLog; /* Disable driver workarounds */ for(auto&& workaround: Utility::String::splitWithoutEmptyParts(args.value("disable-workarounds"))) @@ -685,7 +686,7 @@ bool Context::tryCreate() { currentContext = this; /* Decide whether to print the initialization output or not */ - std::ostream* output = _displayInitializationLog ? Debug::output() : nullptr; + std::ostream* output = _internalFlags & InternalFlag::DisplayInitializationLog ? Debug::output() : nullptr; /* Print some info and initialize state tracker (which also prints some more info) */ diff --git a/src/Magnum/GL/Context.h b/src/Magnum/GL/Context.h index 51d91d45a..febe3ef9f 100644 --- a/src/Magnum/GL/Context.h +++ b/src/Magnum/GL/Context.h @@ -667,6 +667,12 @@ class MAGNUM_GL_EXPORT Context { friend Platform::GLContext; #endif + enum class InternalFlag: UnsignedByte { + DisplayInitializationLog = 1 << 0 + }; + typedef Containers::EnumSet InternalFlags; + CORRADE_ENUMSET_FRIEND_OPERATORS(InternalFlags) + explicit Context(NoCreateT, Int argc, const char** argv, void functionLoader(Context&)); explicit Context(NoCreateT, Utility::Arguments&& args, Int argc, const char** argv, void functionLoader(Context&)): Context{NoCreate, args, argc, argv, functionLoader} {} explicit Context(NoCreateT, Utility::Arguments& args, Int argc, const char** argv, void functionLoader(Context&)); @@ -700,7 +706,7 @@ class MAGNUM_GL_EXPORT Context { /* True means known and disabled, false means known */ std::vector> _driverWorkarounds; std::vector _disabledExtensions; - bool _displayInitializationLog; + InternalFlags _internalFlags; }; #ifndef MAGNUM_TARGET_WEBGL @@ -708,6 +714,7 @@ CORRADE_ENUMSET_OPERATORS(Context::Flags) #endif CORRADE_ENUMSET_OPERATORS(Context::DetectedDrivers) CORRADE_ENUMSET_OPERATORS(Context::States) +CORRADE_ENUMSET_OPERATORS(Context::InternalFlags) #ifndef MAGNUM_TARGET_WEBGL /** @debugoperatorclassenum{Context,Context::Flag} */