Kanzi  3.9.6
Kanzi Engine API
kanzi::qnx::QnxEGLPBufferGraphicsOutput Class Reference

Class representing a QNX EGL pixel buffer graphics output. More...

#include <kanzi/core.ui/platform/graphics_output/qnx_egl/qnx_egl_pbuffer_graphics_output.hpp>

Inheritance diagram for kanzi::qnx::QnxEGLPBufferGraphicsOutput:
[legend]

Public Member Functions

KZ_NO_DISCARD optional< void * > createImage (int target, void *data, int *attributes) noexcept override
 Function for creating native image object, which can be shared between client APIs. More...
 
shared_ptr< QnxEGLWindowcreateWindow (unsigned int bufferCount, int usageFlags) noexcept
 Creates a QNX EGL window. More...
 
bool destroyImage (void *image) noexcept override
 Destroys an EGL image. More...
 
bool flushContext () noexcept
 Flush any pending Qnx screen requests to the compositor. More...
 
void gatherEvents (EventQueue &queue) override
 Amends the given event queue with events received so far. More...
 
optional< SurfaceColorSpacegetColorSpace () const noexcept override
 Gets the color space used by the associated graphics context. More...
 
optional< GraphicsContextAPIgetGraphicsContextAPI () const noexcept override
 Gets the API used by the associated graphics context. More...
 
KZ_NO_DISCARD optional< void * > getNativeContextHandle () const noexcept override
 Gets associated native GL context handle. More...
 
KZ_NO_DISCARD optional< void * > getNativeDisplayHandle () const noexcept override
 Gets associated native GL display handle. More...
 
optional< NativeEventHandlegetNativeEventHandle () const noexcept override
 Returns a waitable event handle for this event source, if available. More...
 
KZ_NO_DISCARD optional< void * > getNativeSurfaceHandle () const noexcept override
 Gets associated native GL surface handle. More...
 
KZ_NO_DISCARD GLProcPointer getProcAddress (string_view functionName) override
 Retrieves pointer to GL function. More...
 
optional< SurfaceClientAPIgetSurfaceClientAPI () const noexcept override
 Gets the type of the associated graphics surface. More...
 
Matrix4x4 getTargetTransformation () const noexcept override
 Returns the target transformation. More...
 
bool makeCurrent () noexcept override
 Make the current EGL thread active. More...
 
bool makeCurrent (QnxEGLWindow &qnxEGLWindow) noexcept
 Make the current EGL thread active. More...
 
 QnxEGLPBufferGraphicsOutput (const QnxEGLPBufferGraphicsOutputProperties &properties)
 Constructor. More...
 
bool releaseCurrent () noexcept override
 Make the current EGL thread inactive. More...
 
bool swapBuffers () override
 Posts rendering results. More...
 
bool swapBuffers (QnxEGLWindow &qnxEGLWindow) noexcept
 Posts rendering results. More...
 
bool swapInterval (int interval) override
 Sets minimum number of displayed video frames before a buffer swap. More...
 
KZ_NO_DISCARD optional< vector< QnxDisplay > > tryGetQnxDisplays () const noexcept
 Tries to get the displays associated with the context. More...
 
KZ_NO_DISCARD int tryGetQnxEGLScreenUsageFlags () const noexcept
 Tries to get QNX Screen EGL usage flags compatible with the current EGL configuration. More...
 
 ~QnxEGLPBufferGraphicsOutput ()
 
- Public Member Functions inherited from kanzi::GraphicsOutput
KZ_NO_DISCARD Vector2 getDpi () const noexcept
 Returns the resolution of the target coordinate system in dots per inch. More...
 
KZ_NO_DISCARD unsigned int getHeight () const noexcept
 Returns the height of layout area in the target coordinate system. More...
 
KZ_NO_DISCARD unsigned int getWidth () const noexcept
 Returns the width of layout area in the target coordinate system. More...
 
virtual ~GraphicsOutput ()=default
 Destructor. More...
 
- Public Member Functions inherited from kanzi::EventSource
virtual ~EventSource ()=default
 Destructor. More...
 
- Public Member Functions inherited from kanzi::GLGraphicsOutput
virtual ~GLGraphicsOutput ()=default
 Destructor. More...
 

Protected Member Functions

void setTargetTransformation (Matrix4x4 targetTransformation) noexcept
 Sets the target transformation. More...
 
void updateCachedValues (unsigned int width, unsigned int height) noexcept
 Updates all cached values from given layout size. More...
 
- Protected Member Functions inherited from kanzi::GraphicsOutput
void updateDpi (Vector2 dpi)
 Updates the target layout area resolution. More...
 
void updateSize (unsigned int width, unsigned int height)
 Updates the target layout area size. More...
 

Additional Inherited Members

- Public Types inherited from kanzi::GLGraphicsOutput
using GLProcPointer = void(*)()
 Pointer to GL function. More...
 

Detailed Description

Class representing a QNX EGL pixel buffer graphics output.

Constructor & Destructor Documentation

◆ QnxEGLPBufferGraphicsOutput()

kanzi::qnx::QnxEGLPBufferGraphicsOutput::QnxEGLPBufferGraphicsOutput ( const QnxEGLPBufferGraphicsOutputProperties properties)
explicit

Constructor.

Parameters
propertiesSpecifies properties to request for the graphics output.

◆ ~QnxEGLPBufferGraphicsOutput()

kanzi::qnx::QnxEGLPBufferGraphicsOutput::~QnxEGLPBufferGraphicsOutput ( )

Member Function Documentation

◆ flushContext()

bool kanzi::qnx::QnxEGLPBufferGraphicsOutput::flushContext ( )
noexcept

Flush any pending Qnx screen requests to the compositor.

Returns
True on success, false on failure.

◆ gatherEvents()

void kanzi::qnx::QnxEGLPBufferGraphicsOutput::gatherEvents ( EventQueue queue)
overridevirtual

Amends the given event queue with events received so far.

Parameters
queueEvent queue to be amended. Do not clear nor assume to be empty.

Implements kanzi::EventSource.

◆ getNativeEventHandle()

optional<NativeEventHandle> kanzi::qnx::QnxEGLPBufferGraphicsOutput::getNativeEventHandle ( ) const
overridevirtualnoexcept

Returns a waitable event handle for this event source, if available.

Return values
nulloptGetting the event handle failed.
Returns
The native event handle.

Implements kanzi::EventSource.

◆ getProcAddress()

KZ_NO_DISCARD GLProcPointer kanzi::qnx::QnxEGLPBufferGraphicsOutput::getProcAddress ( string_view  functionName)
overridevirtual

Retrieves pointer to GL function.

Parameters
functionNameName of the function.
Returns
Pointer to the function, or null if not found.

Implements kanzi::GLGraphicsOutput.

◆ makeCurrent() [1/2]

bool kanzi::qnx::QnxEGLPBufferGraphicsOutput::makeCurrent ( )
overridevirtualnoexcept

Make the current EGL thread active.

Returns
True on success, false on failure.

Implements kanzi::GLGraphicsOutput.

◆ releaseCurrent()

bool kanzi::qnx::QnxEGLPBufferGraphicsOutput::releaseCurrent ( )
overridevirtualnoexcept

Make the current EGL thread inactive.

Returns
True on success, false on failure.

Implements kanzi::GLGraphicsOutput.

◆ swapBuffers() [1/2]

bool kanzi::qnx::QnxEGLPBufferGraphicsOutput::swapBuffers ( )
overridevirtual

Posts rendering results.

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

Returns
True on success, false on failure.

Implements kanzi::GLGraphicsOutput.

◆ swapInterval()

bool kanzi::qnx::QnxEGLPBufferGraphicsOutput::swapInterval ( int  interval)
overridevirtual

Sets minimum number of displayed video frames before a buffer swap.

Parameters
intervalMinimum number of video frames to wait before buffer swap.
Returns
True on success, false on failure.

Implements kanzi::GLGraphicsOutput.

◆ getTargetTransformation()

Matrix4x4 kanzi::qnx::QnxEGLPBufferGraphicsOutput::getTargetTransformation ( ) const
overridevirtualnoexcept

Returns the target transformation.

Returns
Target transformation matrix.

Implements kanzi::GLGraphicsOutput.

◆ getGraphicsContextAPI()

optional<GraphicsContextAPI> kanzi::qnx::QnxEGLPBufferGraphicsOutput::getGraphicsContextAPI ( ) const
overridevirtualnoexcept

Gets the API used by the associated graphics context.

Return values
nulloptGetting the graphics context failed.
Returns
Graphics context API.

Implements kanzi::GLGraphicsOutput.

◆ getSurfaceClientAPI()

optional<SurfaceClientAPI> kanzi::qnx::QnxEGLPBufferGraphicsOutput::getSurfaceClientAPI ( ) const
overridevirtualnoexcept

Gets the type of the associated graphics surface.

Return values
nulloptGetting the graphics surface failed.
Returns
Surface type.

Implements kanzi::GLGraphicsOutput.

◆ getColorSpace()

optional<SurfaceColorSpace> kanzi::qnx::QnxEGLPBufferGraphicsOutput::getColorSpace ( ) const
overridevirtualnoexcept

Gets the color space used by the associated graphics context.

Return values
nulloptGetting the color space failed.
Returns
Color space.

Implements kanzi::GLGraphicsOutput.

◆ getNativeDisplayHandle()

KZ_NO_DISCARD optional<void*> kanzi::qnx::QnxEGLPBufferGraphicsOutput::getNativeDisplayHandle ( ) const
overridevirtualnoexcept

Gets associated native GL display handle.

Return values
nulloptGetting GL display failed.
Returns
The handle of associated display object.

Implements kanzi::GLGraphicsOutput.

◆ getNativeContextHandle()

KZ_NO_DISCARD optional<void*> kanzi::qnx::QnxEGLPBufferGraphicsOutput::getNativeContextHandle ( ) const
overridevirtualnoexcept

Gets associated native GL context handle.

Return values
nulloptGetting GL context failed.
Returns
The handle of associated graphics context object.

Implements kanzi::GLGraphicsOutput.

◆ getNativeSurfaceHandle()

KZ_NO_DISCARD optional<void*> kanzi::qnx::QnxEGLPBufferGraphicsOutput::getNativeSurfaceHandle ( ) const
overridevirtualnoexcept

Gets associated native GL surface handle.

Return values
nulloptGetting GL surface failed.
Returns
The handle of associated surface object.

Implements kanzi::GLGraphicsOutput.

◆ createImage()

KZ_NO_DISCARD optional<void*> kanzi::qnx::QnxEGLPBufferGraphicsOutput::createImage ( int  target,
void *  data,
int *  attributes 
)
overridevirtualnoexcept

Function for creating native image object, which can be shared between client APIs.

The returned image must be destroyed using destroyImage().

Parameters
targetContext-specific target specifier.
dataData to use as image contents.
attributesContext-specific attributes list.
Returns
Returns created image, or null on error.
See also
destroyImage().

Implements kanzi::GLGraphicsOutput.

◆ destroyImage()

bool kanzi::qnx::QnxEGLPBufferGraphicsOutput::destroyImage ( void *  image)
overridevirtualnoexcept

Destroys an EGL image.

Parameters
imageEGL image to destroy.
Returns
True on success, false on failure.

Implements kanzi::GLGraphicsOutput.

◆ tryGetQnxEGLScreenUsageFlags()

KZ_NO_DISCARD int kanzi::qnx::QnxEGLPBufferGraphicsOutput::tryGetQnxEGLScreenUsageFlags ( ) const
noexcept

Tries to get QNX Screen EGL usage flags compatible with the current EGL configuration.

Use the Screen flags when allocating new buffers.

Return values
0Current EGL configuration has no compatible Screen EGL usage flags.
Returns
QNX Screen EGL usage flag bit mask.

◆ createWindow()

shared_ptr<QnxEGLWindow> kanzi::qnx::QnxEGLPBufferGraphicsOutput::createWindow ( unsigned int  bufferCount,
int  usageFlags 
)
noexcept

Creates a QNX EGL window.

Parameters
bufferCountNumber of buffers to attach to a window.
usageFlagsUsage flag bit mask to use for a window.
Returns
Returns created window.

◆ makeCurrent() [2/2]

bool kanzi::qnx::QnxEGLPBufferGraphicsOutput::makeCurrent ( QnxEGLWindow qnxEGLWindow)
noexcept

Make the current EGL thread active.

Parameters
qnxEGLWindowQNX window to activate in the thread.
Returns
True on success, false on failure.

◆ swapBuffers() [2/2]

bool kanzi::qnx::QnxEGLPBufferGraphicsOutput::swapBuffers ( QnxEGLWindow qnxEGLWindow)
noexcept

Posts rendering results.

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

Parameters
qnxEGLWindowQNX window to swap the buffers for.
Returns
True on success, false on failure.

◆ tryGetQnxDisplays()

KZ_NO_DISCARD optional<vector<QnxDisplay> > kanzi::qnx::QnxEGLPBufferGraphicsOutput::tryGetQnxDisplays ( ) const
noexcept

Tries to get the displays associated with the context.

Return values
nulloptTrying to get the displays has failed.
Returns
Displays.

◆ setTargetTransformation()

void kanzi::qnx::QnxEGLPBufferGraphicsOutput::setTargetTransformation ( Matrix4x4  targetTransformation)
inlineprotectednoexcept

Sets the target transformation.

Parameters
targetTransformationThe target transformation matrix.

◆ updateCachedValues()

void kanzi::qnx::QnxEGLPBufferGraphicsOutput::updateCachedValues ( unsigned int  width,
unsigned int  height 
)
protectednoexcept

Updates all cached values from given layout size.

Parameters
widthLayout area width in pixels.
heightLayout area height in pixels.

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