An instance of an EGL context.
std::function< void(LifecycleEvent)> LifecycleListener
bool ClearCurrent() const
Clear the thread association of this context.
std::optional< UniqueID > AddLifecycleListener(const LifecycleListener &listener)
Add a listener that gets invoked when the context is made and cleared current from the thread....
const EGLContext & GetHandle() const
Get the underlying handle to the EGL context.
bool RemoveLifecycleListener(UniqueID id)
Remove a previously added context listener.
bool IsValid() const
Determines if a valid context could be created. The context still needs to be made current on the thr...
bool MakeCurrent(const Surface &surface) const
Make the context current on the calling thread. It is the caller responsibility to ensure that any co...