Kanzi  3.9.9
Kanzi Engine C++ API
kanzi::EGLContext Class Reference

Class representing an EGL context. More...

#include <kanzi/core.ui/platform/context_api/egl/egl_context.hpp>

Public Types

typedef void(* GLProcPointer) ()
 Pointer to GL function. More...
 

Public Member Functions

bool destroy (const EGLDisplay &eglDisplay)
 Destroys EGL context. More...
 
 EGLContext ()
 Default constructor, creates a no context. More...
 
 EGLContext (const EGLDisplay &eglDisplay, const EGLConfig &eglConfig,::EGLContext sharedContext, EGLContextClientVersion contextClientVersion)
 Constructor. More...
 
 EGLContext (const EGLDisplay &eglDisplay, const EGLConfig &eglConfig,::EGLContext sharedContext)
 Constructor. More...
 
 EGLContext (const EGLDisplay &eglDisplay, const EGLConfig &eglConfig,::EGLContext sharedContext, span< const EGLint > attribs)
 Constructor. More...
 
 EGLContext (::EGLContext eglContext)
 Constructor. More...
 
KZ_NO_DISCARD::EGLContext getNativeHandle () const noexcept
 Gets EGL context handle. More...
 

Static Public Member Functions

static KZ_NO_DISCARD::EGLContext getCurrentContext ()
 Gets context for current thread. More...
 
static KZ_NO_DISCARD::EGLContext getNoContext () noexcept
 Gets an no context EGL handle. More...
 
static KZ_NO_DISCARD GLProcPointer getProcAddress (const char *functionName)
 Retrieves pointer to GL function. More...
 

Detailed Description

Class representing an EGL context.

Member Typedef Documentation

typedef void(* kanzi::EGLContext::GLProcPointer) ()

Pointer to GL function.

Constructor & Destructor Documentation

kanzi::EGLContext::EGLContext ( )
explicit

Default constructor, creates a no context.

Postcondition
egl::getError() returns EGL_SUCCESS.
kanzi::EGLContext::EGLContext ( const EGLDisplay eglDisplay,
const EGLConfig eglConfig,
::EGLContext  sharedContext,
EGLContextClientVersion  contextClientVersion 
)
explicit

Constructor.

Parameters
eglDisplayEGL display connection.
eglConfigEGL configuration to use.
sharedContextEGL context to share data with.
contextClientVersionContext client API major version.
Postcondition
egl::getError() returns EGL_SUCCESS.
kanzi::EGLContext::EGLContext ( const EGLDisplay eglDisplay,
const EGLConfig eglConfig,
::EGLContext  sharedContext 
)
explicit

Constructor.

Parameters
eglDisplayEGL display connection.
eglConfigEGL configuration to use.
sharedContextEGL context to share data with.
Postcondition
egl::getError() returns EGL_SUCCESS.
kanzi::EGLContext::EGLContext ( const EGLDisplay eglDisplay,
const EGLConfig eglConfig,
::EGLContext  sharedContext,
span< const EGLint >  attribs 
)
explicit

Constructor.

Parameters
eglDisplayEGL display connection.
eglConfigEGL configuration to use.
sharedContextEGL context to share data with.
attribsList of EGL attributes used to create the context. The list must be terminated with EGL_NONE.
Postcondition
egl::getError() returns EGL_SUCCESS.
kanzi::EGLContext::EGLContext ( ::EGLContext  eglContext)
explicit

Constructor.

Parameters
eglContextEGL context handle.
Postcondition
egl::getError() returns EGL_SUCCESS.

Member Function Documentation

static KZ_NO_DISCARD GLProcPointer kanzi::EGLContext::getProcAddress ( const char *  functionName)
static

Retrieves pointer to GL function.

Parameters
functionNameName of the function.
Returns
Pointer to the function, or null if not found.
static KZ_NO_DISCARD ::EGLContext kanzi::EGLContext::getCurrentContext ( )
static

Gets context for current thread.

Returns
EGL context handle of the current context, or a no context handle if no context is current.
static KZ_NO_DISCARD ::EGLContext kanzi::EGLContext::getNoContext ( )
staticnoexcept

Gets an no context EGL handle.

Returns
EGL context handle with a value representing no context.
bool kanzi::EGLContext::destroy ( const EGLDisplay eglDisplay)

Destroys EGL context.

Call this before destructing the object.

Parameters
eglDisplayEGL display connection.
Postcondition
egl::getError() returns EGL_SUCCESS.
KZ_NO_DISCARD ::EGLContext kanzi::EGLContext::getNativeHandle ( ) const
noexcept

Gets EGL context handle.

Returns
EGL context handle.

The documentation for this class was generated from the following file: