Ocean
|
This class encapsulates an EGL context. More...
#include <EGLContext.h>
Public Types | |
typedef std::pair< EGLint, EGLint > | ConfigAttributePair |
Definition of a configuration attribute pair combining attribute (first) and value (second). | |
typedef std::vector< ConfigAttributePair > | ConfigAttributePairs |
Definition of a vector holding configuration pairs. | |
Public Member Functions | |
EGLContext () | |
Creates a new uninitialized context object. | |
EGLContext (EGLContext &&context) | |
Move constructor. | |
EGLContext (const EGLContext &context)=delete | |
Disabled copy consturctor. | |
~EGLContext () | |
Destructs the context object and releases all remaining EGL resources. | |
EGLint | majorVersion () const |
Returns the major version of this egl context. | |
EGLint | minorVersion () const |
Returns the minor version of this egl context. | |
const EGLDisplay & | display () const |
Returns the display id of this egl context. | |
const EGLConfig & | config () const |
Returns the configuration of the egl context. | |
const ::EGLContext & | context () const |
Returns the context id of this egl context. | |
bool | initialize (const ConfigAttributePairs &configAttributePairs=ConfigAttributePairs(), EGLContext *shareContext=nullptr) |
Initializes this context object. | |
void | release () |
Releases this context. | |
bool | isValid () const |
Returns whether this context is valid (whether the context is initialized) and whether it can be used. | |
operator bool () const | |
Returns whether this context is valid (whether the context is initialized) and whether it can be used. | |
EGLContext & | operator= (EGLContext &&context) |
Move operator. | |
EGLContext & | operator= (const EGLContext &context)=delete |
Disabled copy operator. | |
Static Public Member Functions | |
static const char * | translateError (const EGLint errorValue) |
Translates an EGL error to a string. | |
Protected Attributes | |
EGLint | majorVersion_ |
The major EGL version. | |
EGLint | minorVersion_ |
The minor EGL version. | |
EGLDisplay | display_ |
The EGL display. | |
EGLConfig | config_ |
The EGL config. | |
::EGLContext | context_ |
The EGL context. | |
EGLSurface | dummySurface_ |
The dummy surface. | |
This class encapsulates an EGL context.
typedef std::pair<EGLint, EGLint> Ocean::Platform::GLES::EGLContext::ConfigAttributePair |
Definition of a configuration attribute pair combining attribute (first) and value (second).
typedef std::vector<ConfigAttributePair> Ocean::Platform::GLES::EGLContext::ConfigAttributePairs |
Definition of a vector holding configuration pairs.
Ocean::Platform::GLES::EGLContext::EGLContext | ( | ) |
Creates a new uninitialized context object.
Ocean::Platform::GLES::EGLContext::EGLContext | ( | EGLContext && | context | ) |
Move constructor.
context | The context to be moved |
|
delete |
Disabled copy consturctor.
context | The context which whould be copied |
Ocean::Platform::GLES::EGLContext::~EGLContext | ( | ) |
Destructs the context object and releases all remaining EGL resources.
|
inline |
Returns the configuration of the egl context.
|
inline |
Returns the context id of this egl context.
|
inline |
Returns the display id of this egl context.
bool Ocean::Platform::GLES::EGLContext::initialize | ( | const ConfigAttributePairs & | configAttributePairs = ConfigAttributePairs() , |
EGLContext * | shareContext = nullptr |
||
) |
Initializes this context object.
configAttributePairs | The configuration attributes the resulting context must support. |
shareContext | Optional share context |
bool Ocean::Platform::GLES::EGLContext::isValid | ( | ) | const |
Returns whether this context is valid (whether the context is initialized) and whether it can be used.
|
inline |
Returns the major version of this egl context.
|
inline |
Returns the minor version of this egl context.
|
inlineexplicit |
Returns whether this context is valid (whether the context is initialized) and whether it can be used.
|
delete |
Disabled copy operator.
context | The context which would be copied |
EGLContext & Ocean::Platform::GLES::EGLContext::operator= | ( | EGLContext && | context | ) |
Move operator.
context | The context to be moved |
void Ocean::Platform::GLES::EGLContext::release | ( | ) |
Releases this context.
|
static |
Translates an EGL error to a string.
errorValue | The error value to translate |
|
protected |
The EGL config.
|
protected |
The EGL context.
|
protected |
The EGL display.
|
protected |
The dummy surface.
|
protected |
The major EGL version.
|
protected |
The minor EGL version.