Magnum::Platform::WindowlessEglContext::Configuration class

Configuration.

Contents

Public types

enum class Flag: int { ForwardCompatible = EGL_CONTEXT_OPENGL_FORWARD_COMPATIBLE_BIT_KHR, Debug = EGL_CONTEXT_OPENGL_DEBUG_BIT_KHR }
Context flag.
using Flags = Containers::EnumSet<Flag>
Context flags.

Public functions

auto flags() const -> Flags
Context flags.
auto setFlags(Flags flags) -> Configuration&
Set context flags.
auto addFlags(Flags flags) -> Configuration&
Add context flags.
auto clearFlags(Flags flags) -> Configuration&
Clear context flags.
auto device() const -> UnsignedInt
Device ID to use.
auto setDevice(UnsignedInt id) -> Configuration&
Set device ID to use.

Enum documentation

enum class Magnum::Platform::WindowlessEglContext::Configuration::Flag: int

Context flag.

Enumerators
ForwardCompatible

Forward compatible context

Debug

Debug context. Enabled automatically if the --magnum-gpu-validation command-line option is present.

Typedef documentation

typedef Containers::EnumSet<Flag> Magnum::Platform::WindowlessEglContext::Configuration::Flags

Context flags.

Function documentation

Flags Magnum::Platform::WindowlessEglContext::Configuration::flags() const

Context flags.

Configuration& Magnum::Platform::WindowlessEglContext::Configuration::setFlags(Flags flags)

Set context flags.

Returns Reference to self (for method chaining)

Default is Flag::ForwardCompatible on desktop GL and no flags on OpenGL ES.

Configuration& Magnum::Platform::WindowlessEglContext::Configuration::addFlags(Flags flags)

Add context 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::Platform::WindowlessEglContext::Configuration::clearFlags(Flags flags)

Clear context 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.

UnsignedInt Magnum::Platform::WindowlessEglContext::Configuration::device() const

Device ID to use.

Configuration& Magnum::Platform::WindowlessEglContext::Configuration::setDevice(UnsignedInt id)

Set device ID to use.

Returns Reference to self (for method chaining)

The device ID is expected to be smaller than the count of devices reported by EGL. When using WindowlessEglApplication, this is also exposed as a --magnum-device command-line option and a MAGNUM_DEVICE environment variable.