Magnum::Platform::WindowlessEglContext class

Windowless EGL context.

GL context using EGL without any windowing system, used in WindowlessEglApplication. Does not have any default framebuffer. It is built if WITH_WINDOWLESSEGLAPPLICATION is enabled in CMake.

Meant to be used when there is a need to manage (multiple) GL contexts manually. See Manually managing windowless contexts for more information. If no other application header is included, this class is also aliased to Platform::WindowlessGLContext.

Public types

class Configuration

Constructors, destructors, conversion operators

WindowlessEglContext(const Configuration& configuration, GLContext* context = nullptr) explicit
WindowlessEglContext(NoCreateT) explicit
Construct without creating the context.
WindowlessEglContext(const WindowlessEglContext&) deleted
Copying is not allowed.
WindowlessEglContext(WindowlessEglContext&& other)
Move constructor.

Public functions

auto operator=(const WindowlessEglContext&) -> WindowlessEglContext& deleted
Copying is not allowed.
auto operator=(WindowlessEglContext&& other) -> WindowlessEglContext&
Move assignment.
auto isCreated() const -> bool
Whether the context is created.
auto makeCurrent() -> bool
Make the context current.

Function documentation

Magnum::Platform::WindowlessEglContext::WindowlessEglContext(const Configuration& configuration, GLContext* context = nullptr) explicit


configuration Context configuration
context Optional Magnum context instance constructed using NoCreate to manage driver workarounds

Once the context is created, make it current using makeCurrent() and create Platform::GLContext instance to be able to use Magnum.

Magnum::Platform::WindowlessEglContext::WindowlessEglContext(NoCreateT) explicit

Construct without creating the context.

Move a instance with created context over to make it usable.



Destroys the context, if any.

bool Magnum::Platform::WindowlessEglContext::makeCurrent()

Make the context current.

Prints error message and returns false on failure, otherwise returns true.