8 #ifndef META_OCEAN_PLATFORM_GLES_EGL_CONTEXT_H
9 #define META_OCEAN_PLATFORM_GLES_EGL_CONTEXT_H
15 #include <EGL/eglext.h>
77 inline EGLint majorVersion()
const;
83 inline EGLint minorVersion()
const;
89 inline const EGLDisplay& display()
const;
95 inline const EGLConfig& config()
const;
101 inline const ::EGLContext& context()
const;
127 explicit inline operator bool()
const;
199 inline EGLContext::operator bool()
const
This class encapsulates an EGL context.
Definition: EGLContext.h:32
~EGLContext()
Destructs the context object and releases all remaining EGL resources.
::EGLContext context_
The EGL context.
Definition: EGLContext.h:163
EGLConfig config_
The EGL config.
Definition: EGLContext.h:160
EGLContext(const EGLContext &context)=delete
Disabled copy consturctor.
const EGLDisplay & display() const
Returns the display id of this egl context.
Definition: EGLContext.h:184
EGLContext & operator=(const EGLContext &context)=delete
Disabled copy operator.
void release()
Releases this context.
EGLint majorVersion_
The major EGL version.
Definition: EGLContext.h:151
EGLint minorVersion_
The minor EGL version.
Definition: EGLContext.h:154
EGLContext()
Creates a new uninitialized context object.
const ::EGLContext & context() const
Returns the context id of this egl context.
Definition: EGLContext.h:194
EGLint majorVersion() const
Returns the major version of this egl context.
Definition: EGLContext.h:174
bool initialize(const ConfigAttributePairs &configAttributePairs=ConfigAttributePairs(), EGLContext *shareContext=nullptr)
Initializes this context object.
const EGLConfig & config() const
Returns the configuration of the egl context.
Definition: EGLContext.h:189
static const char * translateError(const EGLint errorValue)
Translates an EGL error to a string.
bool isValid() const
Returns whether this context is valid (whether the context is initialized) and whether it can be used...
EGLDisplay display_
The EGL display.
Definition: EGLContext.h:157
std::vector< ConfigAttributePair > ConfigAttributePairs
Definition of a vector holding configuration pairs.
Definition: EGLContext.h:45
EGLint minorVersion() const
Returns the minor version of this egl context.
Definition: EGLContext.h:179
EGLSurface dummySurface_
The dummy surface.
Definition: EGLContext.h:166
EGLContext(EGLContext &&context)
Move constructor.
std::pair< EGLint, EGLint > ConfigAttributePair
Definition of a configuration attribute pair combining attribute (first) and value (second).
Definition: EGLContext.h:40
EGLContext & operator=(EGLContext &&context)
Move operator.
The namespace covering the entire Ocean framework.
Definition: Accessor.h:15