Magnum::GL::Context::Configuration class new in Git master

Configuration.

Affects how Magnum's context creation behaves. See Creating a context for more information.

Derived classes

class Magnum::Platform::AbstractXApplication::GLConfiguration
OpenGL context configuration.
class Magnum::Platform::AndroidApplication::GLConfiguration
OpenGL context configuration.
class Magnum::Platform::EmscriptenApplication::GLConfiguration
WebGL context configuration.
class Magnum::Platform::GlfwApplication::GLConfiguration
OpenGL context configuration.
class Magnum::Platform::Sdl2Application::GLConfiguration
OpenGL context configuration.
class Magnum::Platform::WindowlessCglContext::Configuration
Configuration.
class Magnum::Platform::WindowlessEglContext::Configuration
Configuration.
class Magnum::Platform::WindowlessGlxContext::Configuration
Configuration.
class Magnum::Platform::WindowlessIosContext::Configuration
Configuration.
class Magnum::Platform::WindowlessWglContext::Configuration
Configuration.

Public types

enum class Flag: UnsignedLong { Windowless = 1ull << 59, QuietLog = 1ull << 60, VerboseLog = 1ull << 61, GpuValidation = 1ull << 62, GpuValidationNoError = 1ull << 63 }
Context setup flag.
using Flags = Containers::EnumSet<Flag>
Context setup flags.

Constructors, destructors, conversion operators

Configuration(const Configuration& other)
Copy constructor.
Configuration(Configuration&&) noexcept
Move constructor.

Public functions

auto operator=(const Configuration& other) -> Configuration&
Copy constructor.
auto operator=(Configuration&&) -> Configuration& noexcept
Move assignment.
auto flags() const -> Flags
Context setup flags.
auto setFlags(Flags flags) -> Configuration&
Set context setup flags.
auto addFlags(Flags flags) -> Configuration&
Add context setup flags.
auto clearFlags(Flags flags) -> Configuration&
Clear context setup flags.
auto disabledWorkarounds() const -> Containers::ArrayView<const Containers::StringView>
Disabled driver workarounds.
auto addDisabledWorkarounds(const Containers::StringIterable& workarounds) -> Configuration&
Add disabled driver workarounds.
auto disabledExtensions() const -> Containers::ArrayView<const Extension>
Disabled extensions.
auto addDisabledExtensions(Containers::ArrayView<const Extension> extensions) -> Configuration&
Add disabled extensions.
auto addDisabledExtensions(std::initializer_list<Extension> extensions) -> Configuration&
template<class ... E>
auto addDisabledExtensions() -> Configuration&

Enum documentation

enum class Magnum::GL::Context::Configuration::Flag: UnsignedLong

Context setup flag.

Flags affecting the actual GL context are merged with this enum in Platform::*Application::GLConfiguration::Flag and Platform::Windowless*Application::Configuration::Flag and after context creation available through Context::Flag / Context::flags().

Enumerators
Windowless

Treat the context as windowless, assume there's no default framebuffer and thus don't initialize or touch defaultFramebuffer in any way.

This flag is implicitly enabled in all Platform::Windowless*Application::Configuration, and, conversely, not possible to enable in any Platform::*Application::GLConfiguration.

QuietLog

Print only warnings and errors instead of the usual startup log listing used extensions and workarounds. Ignored if Flag::VerboseLog is set.

Corresponds to the --magnum-log quiet command-line option.

VerboseLog

Print additional information on startup in addition to the usual startup log that lists used extensions and workarounds. Has a precedence over Flag::QuietLog.

Corresponds to the --magnum-log verbose command-line option.

GpuValidation

Enable GPU validation, if available. Has a precedence over Flag::GpuValidationNoError.

Corresponds to the --magnum-gpu-validation on command-line option.

GpuValidationNoError

Enable a context without error reporting, if available. Ignored if Flag::GpuValidation is set.

Corresponds to the --magnum-gpu-validation no-error command-line option.

Typedef documentation

typedef Containers::EnumSet<Flag> Magnum::GL::Context::Configuration::Flags

Context setup flags.

Function documentation

Configuration& Magnum::GL::Context::Configuration::setFlags(Flags flags)

Set context setup flags.

Returns Reference to self (for method chaining)

By default no flags are set. Note that subclasses might have different flag defaults, see their documentation for more information. To avoid clearing default flags by accident, prefer to use addFlags() and clearFlags() instead.

Particular Flag values correspond to the --magnum-log and --magnum-gpu-validation command-line options.

Configuration& Magnum::GL::Context::Configuration::addFlags(Flags flags)

Add context setup flags.

Returns Reference to self (for method chaining)

Unlike setFlags(), ORs the flags with existing instead of replacing them. Useful for preserving the defaults.

Configuration& Magnum::GL::Context::Configuration::clearFlags(Flags flags)

Clear context setup flags.

Returns Reference to self (for method chaining)

Unlike setFlags(), ANDs the inverse of flags with existing instead of replacing them. Useful for removing default flags.

Configuration& Magnum::GL::Context::Configuration::addDisabledWorkarounds(const Containers::StringIterable& workarounds)

Add disabled driver workarounds.

Returns Reference to self (for method chaining)

Accepts strings from the list at Driver workarounds. Unknown workarounds are ignored with a warning. By default no workarounds are disabled.

Corresponds to the --magnum-disable-workarounds command-line option.

Configuration& Magnum::GL::Context::Configuration::addDisabledExtensions(Containers::ArrayView<const Extension> extensions)

Add disabled extensions.

Returns Reference to self (for method chaining)

By default no extensions are disabled, except for those disabled by driver workarounds.

Corresponds to the --magnum-disable-extensions command-line option.

Configuration& Magnum::GL::Context::Configuration::addDisabledExtensions(std::initializer_list<Extension> extensions)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<class ... E>
Configuration& Magnum::GL::Context::Configuration::addDisabledExtensions()

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.