Kanzi  3.9.5
Kanzi Engine 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, EGLint contextClientVersion)
 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

◆ GLProcPointer

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

Pointer to GL function.

Constructor & Destructor Documentation

◆ EGLContext() [1/3]

kanzi::EGLContext::EGLContext ( )
explicit

Default constructor, creates a no context.

Postcondition
egl::getError() returns EGL_SUCCESS.

◆ EGLContext() [2/3]

kanzi::EGLContext::EGLContext ( const EGLDisplay eglDisplay,
const EGLConfig eglConfig,
::EGLContext  sharedContext,
EGLint  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/3]

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: