Kanzi 3.9.10
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.
 

Public Member Functions

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

Static Public Member Functions

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

Detailed Description

Class representing an EGL context.

Member Typedef Documentation

◆ GLProcPointer

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

Pointer to GL function.

Constructor & Destructor Documentation

◆ EGLContext() [1/5]

kanzi::EGLContext::EGLContext ( )
explicit

Default constructor, creates a no context.

Postcondition
egl::getError() returns EGL_SUCCESS.

◆ EGLContext() [2/5]

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.

◆ EGLContext() [3/5]

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.

◆ EGLContext() [4/5]

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.

◆ EGLContext() [5/5]

kanzi::EGLContext::EGLContext ( ::EGLContext eglContext)
explicit

Constructor.

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

Member Function Documentation

◆ getProcAddress()

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.

◆ getCurrentContext()

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.

◆ getNoContext()

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.

◆ destroy()

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.

◆ getNativeHandle()

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: