Kanzi 3.9.14
kanzi::EGLPBufferSurface Class Reference

Class representing EGL PBuffer surface. More...

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

Public Member Functions

bool destroy (const EGLDisplay &eglDisplay)
 Destroys EGL PBuffer surface.
 
 EGLPBufferSurface (::EGLSurface eglSurface) noexcept
 Constructor.
 
KZ_NO_DISCARD::EGLSurface getNativeHandle () const noexcept
 Gets EGL PBuffer surface handle.
 
bool swapBuffers (const EGLDisplay &eglDisplay) const
 Posts rendering results.
 

Static Public Member Functions

static KZ_NO_DISCARD ::EGLSurface getNoSurface () noexcept
 Gets a no surface EGL surface handle.
 
static KZ_NO_DISCARD optional< EGLPBufferSurfacetryCreate (const EGLDisplay &eglDisplay, const EGLConfig &eglConfig, int width, int height, const SurfaceColorSpace surfaceColorSpace) noexcept
 Creates a PBuffer surface of the default color space, unsuitable for use as a texture.
 
static KZ_NO_DISCARD optional< EGLPBufferSurfacetryCreate (const EGLDisplay &eglDisplay, const EGLConfig &eglConfig, span< EGLint > surfaceAttributes) noexcept
 Creates an EGL PBuffer surface.
 

Detailed Description

Class representing EGL PBuffer surface.

Constructor & Destructor Documentation

◆ EGLPBufferSurface()

kanzi::EGLPBufferSurface::EGLPBufferSurface ( ::EGLSurface eglSurface)
explicitnoexcept

Constructor.

Parameters
eglSurfaceEGL window surface handle.
Postcondition
egl::getError() returns EGL_SUCCESS.
Since
Kanzi 3.9.11

Member Function Documentation

◆ getNoSurface()

static KZ_NO_DISCARD ::EGLSurface kanzi::EGLPBufferSurface::getNoSurface ( )
staticnoexcept

Gets a no surface EGL surface handle.

Returns
EGL surface handle with a value representing no surface.

◆ tryCreate() [1/2]

static KZ_NO_DISCARD optional< EGLPBufferSurface > kanzi::EGLPBufferSurface::tryCreate ( const EGLDisplay & eglDisplay,
const EGLConfig & eglConfig,
int width,
int height,
const SurfaceColorSpace surfaceColorSpace )
staticnoexcept

Creates a PBuffer surface of the default color space, unsuitable for use as a texture.

Parameters
eglDisplayEGL display connection.
eglConfigEGL configuration to use.
widthWidth of the PBuffer surface in pixels.
heightHeight of the PBuffer surface in pixels.
surfaceColorSpaceColor space to use for the surface.
Return values
nulloptSurface creation failed.
Returns
The created EGL pbuffer surface.
Since
Kanzi 3.9.11 added surfaceColorSpace.

◆ tryCreate() [2/2]

static KZ_NO_DISCARD optional< EGLPBufferSurface > kanzi::EGLPBufferSurface::tryCreate ( const EGLDisplay & eglDisplay,
const EGLConfig & eglConfig,
span< EGLint > surfaceAttributes )
staticnoexcept

Creates an EGL PBuffer surface.

Parameters
eglDisplayEGL display connection.
eglConfigEGL configuration to use.
surfaceAttributesSpan of extra attributes. If the span is not empty, last element must be EGL_NONE.
Return values
nulloptSurface creation failed.
Returns
The created EGL pbuffer surface.
Since
Kanzi 3.9.11 added surfaceAttributes, removed attributes.

◆ destroy()

bool kanzi::EGLPBufferSurface::destroy ( const EGLDisplay & eglDisplay)

Destroys EGL PBuffer surface.

Call this before destructing the object.

Parameters
eglDisplayEGL display connection.
Postcondition
egl::getError() returns EGL_SUCCESS.

◆ swapBuffers()

bool kanzi::EGLPBufferSurface::swapBuffers ( const EGLDisplay & eglDisplay) const

Posts rendering results.

Implicitly flushes the rendering pipeline and executes all received rendering commands before posting.

Parameters
eglDisplayEGL display connection.
See also
swapInterval().
Returns
True on success, false on failure.
Postcondition
egl::getError() returns EGL_SUCCESS.

◆ getNativeHandle()

KZ_NO_DISCARD::EGLSurface kanzi::EGLPBufferSurface::getNativeHandle ( ) const
noexcept

Gets EGL PBuffer surface handle.

Returns
EGL PBuffer surface handle.

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