class
ConfigurationConfiguration.
Contents
- Reference
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 new in 2019.10
- Device ID to use.
- auto setDevice(UnsignedInt id) -> Configuration& new in 2019.10
- Set device ID to use.
- auto cudaDevice() const -> UnsignedInt new in 2020.06
- CUDA device ID to use.
- auto setCudaDevice(UnsignedInt id) -> Configuration& new in 2020.06
- Set the CUDA device ID to use.
- auto setSharedContext(EGLDisplay display, EGLContext context) -> Configuration& new in 2020.06
- Create a shared context.
- auto sharedDisplay() const -> EGLContext new in 2020.06
- Shared display.
- auto sharedContext() const -> EGLContext new in 2020.06
- Shared context.
Enum documentation
enum class Magnum:: Platform:: WindowlessEglContext:: Configuration:: Flag: int
Context flag.
Enumerators | |
---|---|
ForwardCompatible |
Forward compatible context |
Debug |
Debug context. Enabled automatically if the |
Typedef documentation
typedef Containers:: EnumSet<Flag> Magnum:: Platform:: WindowlessEglContext:: Configuration:: Flags
Context flags.
Function documentation
Configuration& Magnum:: Platform:: WindowlessEglContext:: Configuration:: setFlags(Flags flags)
Set context flags.
Returns | Reference to self (for method chaining) |
---|
Default is Flag::
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 new in 2019.10
Device ID to use.
Configuration& Magnum:: Platform:: WindowlessEglContext:: Configuration:: setDevice(UnsignedInt id) new in 2019.10
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. If setSharedContext() is set, this value is ignored and the device is picked to be the same as in the shared context instead.
By default it's set to 0
, taking the first found EGL device.
UnsignedInt Magnum:: Platform:: WindowlessEglContext:: Configuration:: cudaDevice() const new in 2020.06
CUDA device ID to use.
Configuration& Magnum:: Platform:: WindowlessEglContext:: Configuration:: setCudaDevice(UnsignedInt id) new in 2020.06
Set the CUDA device ID to use.
Returns | Reference to self (for method chaining) |
---|
If a device with given CUDA ID is not found, context creation fails. When using WindowlessEglApplication, this is also exposed as a --magnum-cuda-device
command-line option and a MAGNUM_CUDA_DEVICE
environment variable. If setSharedContext() is set, this value is ignored and the device is picked to be the same as in the shared context instead.
If a CUDA device is set, it takes precedence over the device ID set with setDevice(). By default it's set to 0xffffffffu
, indicating that setDevice() is used instead.
Configuration& Magnum:: Platform:: WindowlessEglContext:: Configuration:: setSharedContext(EGLDisplay display,
EGLContext context) new in 2020.06
Create a shared context.
Returns | Reference to self (for method chaining) |
---|
When set, the created context will share a subset of OpenGL objects with context
and its associated display
, instead of being independent. Many caveats and limitations apply to shared OpenGL contexts, please consult the OpenGL specification for details. Default is EGL_NO_CONTEXT
, i.e. no sharing. See Shared EGL contexts for more information.
EGLContext Magnum:: Platform:: WindowlessEglContext:: Configuration:: sharedDisplay() const new in 2020.06
Shared display.
EGLContext Magnum:: Platform:: WindowlessEglContext:: Configuration:: sharedContext() const new in 2020.06
Shared context.