Kanzi 4.1.0
kanzi::platform::EglX11GraphicsContext Class Reference

EGL implementation of GlGraphicsContext for X11. More...

#include <kanzi/platform/platform/gl/graphics_context/egl_x11/egl_x11_graphics_context.hpp>

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

Public Member Functions

 EglX11GraphicsContext (PlatformContext &platformContext, InitializationInfo &&info)
 Constructor.
 
- 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.
 
bool swapBuffers (SurfaceHandle surface) override
 GlGraphicsContext::swapBuffers() 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::EGLNativeDisplayType fetchNativeDisplay (PlatformContext &platformContext) override
 EglGraphicsContext::fetchNativeDisplay() 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.
 
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 KZ_NO_DISCARD GLFunctionPointers loadGlFunctions () noexcept
 Loads required GL function pointers.
 
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 X11.

Provides an X11-specific override of getNativeDisplay().

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

Constructor & Destructor Documentation

◆ EglX11GraphicsContext()

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

Constructor.

Parameters
platformContextPlatform context to use.
infoInitialization info struct.

Member Function Documentation

◆ fetchNativeDisplay()

KZ_NO_DISCARD::EGLNativeDisplayType kanzi::platform::EglX11GraphicsContext::fetchNativeDisplay ( PlatformContext & platformContext)
overrideprotectedvirtual

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