Kanzi 4.1.0
kanzi::platform::EglOhosGraphicsContext Class Reference

EGL implementation of GlGraphicsContext for OpenHarmony OS. More...

#include <kanzi/platform/platform/gl/graphics_context/egl_ohos/egl_ohos_graphics_context.hpp>

Inheritance diagram for kanzi::platform::EglOhosGraphicsContext:
[legend]

Public Member Functions

 EglOhosGraphicsContext (PlatformContext &platformContext, InitializationInfo &&info)
 Constructor.
 
bool swapBuffers (SurfaceHandle surface) override
 GlGraphicsContext::swapBuffers() implementation.
 
- Public Member Functions inherited from kanzi::platform::EglGraphicsContext
SurfaceHandle createSurface (NativeSurfaceHandle windowHandle, const SurfaceProperties &properties) override
 GlGraphicsContext::createSurface() implementation.
 
ThreadContextHandle createThreadContext () override
 GlGraphicsContext::createThreadContext() implementation.
 
bool destroySurface (SurfaceHandle surface) override
 GlGraphicsContext::destroySurface() implementation.
 
void destroyThreadContext (ThreadContextHandle context) override
 GlGraphicsContext::destroyThreadContext() implementation.
 
 EglGraphicsContext (PlatformContext &platformContext, InitializationInfo &&info)
 Constructor.
 
KZ_NO_DISCARD ApiBackendBasicInfo getApiBackendBasicInfo () const noexcept
 Provides basic information about current API backend.
 
SurfaceContextHandle getCurrentSurfaceContext () override
 GlGraphicsContext::getCurrentSurfaceContext() implementation.
 
voidgetGLProcAddress (const char *pName) override
 GlGraphicsContext::getGLProcAddress() implementation.
 
SurfaceContextHandle getSurfaceGLContext (SurfaceHandle surface) override
 GlGraphicsContext::getSurfaceGLContext() implementation.
 
SurfaceProperties getSurfaceProperties (SurfaceHandle surface) override
 GlGraphicsContext::getSurfaceProperties() implementation.
 
vector< SurfaceHandlegetSurfaces (SurfaceContextHandle context) override
 GlGraphicsContext::getSurfaces() implementation.
 
bool initialize () override
 GlGraphicsContext::initialize() implementation.
 
bool isFeatureEnabled (PlatformFeatureId feature) const override
 GlGraphicsContext::isFeatureEnabled() implementation.
 
void makeSurfaceCurrent (SurfaceHandle surface) override
 GlGraphicsContext::makeSurfaceCurrent() implementation.
 
void makeThreadCurrent (ThreadContextHandle context) override
 GlGraphicsContext::makeThreadCurrent() implementation.
 
void shutdown () override
 GlGraphicsContext::shutdown() implementation.
 
virtual ~EglGraphicsContext ()=default
 Destructor.
 
- Public Member Functions inherited from kanzi::platform::GlGraphicsContext
template<typename Return , typename... Args>
bool getGLProcAddressInto (function_ptr< Return, Args... > &proc, const char *pName)
 Dynamically loads a GL function pointer into specified location.
 
virtual ~GlGraphicsContext ()=default
 Destructor.
 

Protected Member Functions

KZ_NO_DISCARD GLFunctionPointers loadGlFunctions () noexcept override
 EglGraphicsContext::loadGlFunctions() implementation.
 
- Protected Member Functions inherited from kanzi::platform::EglGraphicsContext
KZ_NO_DISCARD PresentMode clampToSupportedPresentMode (PresentMode mode) noexcept
 Clamps provided PresentMode to a supported subset.
 
virtual KZ_NO_DISCARD unique_ptr< AbstractWindowSurfacecreateDummySurface (EGLPBufferSurface &&pbuffer) noexcept
 Creates the dummy surface wrapper used for surfaceless context fallback.
 
virtual KZ_NO_DISCARD ContextNodePtr createEGLContext (const EGLConfig &config, ::EGLContext parentContext) noexcept
 Creates a new suitable context for provided config.
 
virtual KZ_NO_DISCARD unique_ptr< AbstractWindowSurfacecreateWindowSurface (NativeSurfaceHandle windowHandle, const EGLConfig &config, SurfaceColorSpace colorSpace) noexcept
 Factory function to create window surface.
 
virtual bool destroySurfaceInternal (SurfaceNodePtr surfaceNode) noexcept
 Destroys EGL surface.
 
KZ_NO_DISCARD ContextNodePtr ensureEGLContext (const EGLConfig &config, ::EGLContext parentContext) noexcept
 Finds suitable context for provided config or creates a new one.
 
virtual KZ_NO_DISCARD ::EGLNativeDisplayType fetchNativeDisplay (PlatformContext &platformContext)
 Gets a native EGL display.
 
KZ_NO_DISCARD ContextNodePtr findLastUsedContext (thread::id threadId) noexcept
 Finds last context that was used on a specified thread.
 
KZ_NO_DISCARD const EGLDisplaygetDisplay () const noexcept
 Gets EGL display.
 
KZ_NO_DISCARD const GLFunctionPointersgetGlFunctionPointers () const noexcept
 Gets GL function pointers struct.
 
virtual KZ_NO_DISCARD flat_set< string_view > getUndiscoverableEglExtensions () noexcept
 Gets extensions that platform does not report support for, but are nevertheless supported.
 
virtual bool makeCurrentInternal (ContextNodePtr contextNode, SurfaceNodePtr surfaceNode) noexcept
 Makes provided context and surface current on this thread.
 
KZ_NO_DISCARD flat_set< string_view > queryEglExtensions () const noexcept
 Queries supported EGL extensions.
 
KZ_NO_DISCARD flat_set< string_view > queryGlExtensions () const noexcept
 Queries supported GL extensions.
 
virtual KZ_NO_DISCARD EGLConfig selectEGLConfig (const SurfaceProperties &properties) noexcept
 Selects EGL config based on provided surface properties.
 
KZ_NO_DISCARD SurfaceColorSpace selectSuitableColorSpace (const SurfaceProperties &properties) noexcept
 Selects suitable colorspace for specified surface properties.
 
void setSwapInterval (SurfaceNodePtr surfaceNode, ContextNodePtr contextNode, ContextNodePtr lastUsedContextNode, PresentMode presentMode) noexcept
 Sets swap interval for a specified surface, while preserving current EGL context and surface.
 
virtual bool setSwapIntervalForCurrentSurface (PresentMode mode) noexcept
 Sets swap interval for current surface based on present mode.
 
KZ_NO_DISCARD vector< EGLintsurfaceColorSpaceToAttributes (SurfaceColorSpace colorSpace) noexcept
 Constructs EGL attributes for a specified SurfaceColorSpace.
 

Additional Inherited Members

- Protected Types inherited from kanzi::platform::EglGraphicsContext
using ContextContainer
 
using ContextNodePtr
 
using SurfaceContainer
 
using SurfaceNodePtr
 
using ThreadContainer
 
using ThreadNodePtr
 

Detailed Description

EGL implementation of GlGraphicsContext for OpenHarmony OS.

Provides an OpenHarmony OS-specific override of swapBuffers().

Since
Kanzi 4.0.0
Kanzi 4.1.0 renamed from EglOhosContextApi.
Attention
This feature is experimental and is likely to change in future releases.

Constructor & Destructor Documentation

◆ EglOhosGraphicsContext()

kanzi::platform::EglOhosGraphicsContext::EglOhosGraphicsContext ( PlatformContext & platformContext,
InitializationInfo && info )
explicit

Constructor.

Parameters
platformContextPlatform context to use.
infoInitialization info struct.

Member Function Documentation

◆ swapBuffers()

bool kanzi::platform::EglOhosGraphicsContext::swapBuffers ( SurfaceHandle surface)
overridevirtual

◆ loadGlFunctions()

KZ_NO_DISCARD GLFunctionPointers kanzi::platform::EglOhosGraphicsContext::loadGlFunctions ( )
overrideprotectedvirtualnoexcept

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