class
WindowlessEglContextWindowless EGL context.
GL context using EGL without any windowing system, used in WindowlessEglApplication. Does not have any default framebuffer.
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
- Configuration.
Constructors, destructors, conversion operators
- WindowlessEglContext(const Configuration& configuration, GLContext* context = nullptr) explicit
- Constructor.
- WindowlessEglContext(NoCreateT) explicit
- Construct without creating the context.
- WindowlessEglContext(const WindowlessEglContext&) deleted
- Copying is not allowed.
- WindowlessEglContext(WindowlessEglContext&& other) noexcept
- Move constructor.
- ~WindowlessEglContext()
- Destructor.
Public functions
- auto operator=(const WindowlessEglContext&) -> WindowlessEglContext& deleted
- Copying is not allowed.
- auto operator=(WindowlessEglContext&& other) -> WindowlessEglContext& noexcept
- Move assignment.
- auto isCreated() const -> bool
- Whether the context is created.
- auto makeCurrent() -> bool
- Make the context current.
- auto release() -> bool new in Git master
- Release current context.
- auto glContext() -> EGLContext new in 2020.06
- Underlying OpenGL context.
Function documentation
Magnum:: Platform:: WindowlessEglContext:: WindowlessEglContext(const Configuration& configuration,
GLContext* context = nullptr) explicit
Constructor.
Parameters | |
---|---|
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::
Magnum:: Platform:: WindowlessEglContext:: WindowlessEglContext(NoCreateT) explicit
Construct without creating the context.
Move a instance with created context over to make it usable.
Magnum:: Platform:: WindowlessEglContext:: ~WindowlessEglContext()
Destructor.
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
. If the context is current on another thread, you have to release() it there first — an OpenGL context can't be current in multiple threads at the same time.
bool Magnum:: Platform:: WindowlessEglContext:: release() new in Git master
Release current context.
Releases a context previously made current using makeCurrent(). Prints error message and returns false
on failure, otherwise returns true
.
EGLContext Magnum:: Platform:: WindowlessEglContext:: glContext() new in 2020.06
Underlying OpenGL context.
Use in case you need to call EGL functionality directly or in order to create a shared context. Returns nullptr
in case the context was not created yet.