Kanzi  3.9.7
Kanzi Engine API
kanzi::GLGraphicsOutput Class Referenceabstract

GLGraphicsOutput class. More...

#include <kanzi/core.ui/platform/graphics_backend/gl/gl_graphics_output.hpp>

Inheritance diagram for kanzi::GLGraphicsOutput:
[legend]

Public Types

using GLProcPointer) = void(*)(
 Pointer to GL function. More...
 

Public Member Functions

virtual KZ_NO_DISCARD optional< void * > createImage (int target, void *data, int *attributes) noexcept=0
 Function for creating native image object, which can be shared between client APIs. More...
 
virtual bool destroyImage (void *image) noexcept=0
 Function for destroying native image object. More...
 
virtual KZ_NO_DISCARD optional< SurfaceColorSpacegetColorSpace () const noexcept=0
 Gets the color space used by the associated graphics context. More...
 
virtual KZ_NO_DISCARD optional< GraphicsContextAPIgetGraphicsContextAPI () const noexcept=0
 Gets the API used by the associated graphics context. More...
 
virtual KZ_NO_DISCARD optional< void * > getNativeContextHandle () const noexcept=0
 Gets associated native GL context handle. More...
 
virtual KZ_NO_DISCARD optional< void * > getNativeDisplayHandle () const noexcept=0
 Gets associated native GL display handle. More...
 
virtual KZ_NO_DISCARD optional< void * > getNativeSurfaceHandle () const noexcept=0
 Gets associated native GL surface handle. More...
 
virtual KZ_NO_DISCARD GLProcPointer getProcAddress (string_view functionName)=0
 Retrieves pointer to GL function. More...
 
virtual KZ_NO_DISCARD optional< SurfaceClientAPIgetSurfaceClientAPI () const noexcept=0
 Gets the type of the associated graphics surface. More...
 
virtual KZ_NO_DISCARD Matrix4x4 getTargetTransformation () const noexcept=0
 Returns the target transformation. More...
 
virtual bool makeCurrent ()=0
 Makes the graphics output active for the current thread. More...
 
virtual bool releaseCurrent ()=0
 Makes the currently active graphics output inactive for the current thread. More...
 
virtual bool swapBuffers ()=0
 Posts rendering results. More...
 
virtual bool swapInterval (int interval)=0
 Sets the minimum number of frames per buffer swap. More...
 
virtual ~GLGraphicsOutput ()=default
 Destructor. More...
 

Detailed Description

GLGraphicsOutput class.

Interface defining basic functionality used by the GL renderer.

Member Typedef Documentation

using kanzi::GLGraphicsOutput::GLProcPointer = void (*)(

Pointer to GL function.

Constructor & Destructor Documentation

virtual kanzi::GLGraphicsOutput::~GLGraphicsOutput ( )
virtualdefault

Destructor.

Member Function Documentation

virtual KZ_NO_DISCARD GLProcPointer kanzi::GLGraphicsOutput::getProcAddress ( string_view  functionName)
pure virtual

Retrieves pointer to GL function.

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

Implemented in kanzi::win32::DefaultWin32WGLGraphicsOutput, kanzi::qnx::DefaultQnxEGLGraphicsOutput, kanzi::qnx::QnxEGLPBufferGraphicsOutput, kanzi::emscripten::DefaultEmscriptenGraphicsOutput, and kanzi::LegacyGraphicsOutput.

virtual bool kanzi::GLGraphicsOutput::makeCurrent ( )
pure virtual
virtual bool kanzi::GLGraphicsOutput::releaseCurrent ( )
pure virtual
virtual bool kanzi::GLGraphicsOutput::swapBuffers ( )
pure virtual

Posts rendering results.

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

See also
swapInterval().
Returns
True, on success.

Implemented in kanzi::win32::DefaultWin32WGLGraphicsOutput, kanzi::qnx::DefaultQnxEGLGraphicsOutput, kanzi::qnx::QnxEGLPBufferGraphicsOutput, kanzi::emscripten::DefaultEmscriptenGraphicsOutput, and kanzi::LegacyGraphicsOutput.

virtual bool kanzi::GLGraphicsOutput::swapInterval ( int  interval)
pure virtual

Sets the minimum number of frames per buffer swap.

See also
swapBuffers().
Parameters
intervalThe minimum number of video frame periods per buffer swap. Negative interval values are reserved for platform-specific special cases.
Returns
True, on success.

Implemented in kanzi::win32::DefaultWin32WGLGraphicsOutput, kanzi::qnx::DefaultQnxEGLGraphicsOutput, kanzi::qnx::QnxEGLPBufferGraphicsOutput, kanzi::emscripten::DefaultEmscriptenGraphicsOutput, and kanzi::LegacyGraphicsOutput.

virtual KZ_NO_DISCARD Matrix4x4 kanzi::GLGraphicsOutput::getTargetTransformation ( ) const
pure virtualnoexcept

Returns the target transformation.

Use the target transformation to transform content coordinates to target coordinates.

Note
This transformation maps pixels to pixels. It is independent of the target resolution.
Returns
Target transformation matrix.

Implemented in kanzi::win32::DefaultWin32WGLGraphicsOutput, kanzi::qnx::DefaultQnxEGLGraphicsOutput, kanzi::qnx::QnxEGLPBufferGraphicsOutput, kanzi::emscripten::DefaultEmscriptenGraphicsOutput, and kanzi::LegacyGraphicsOutput.

virtual KZ_NO_DISCARD optional<void*> kanzi::GLGraphicsOutput::getNativeDisplayHandle ( ) const
pure virtualnoexcept

Gets associated native GL display handle.

Returns
The handle of associated display object, or nullopt on error.

Implemented in kanzi::qnx::DefaultQnxEGLGraphicsOutput, kanzi::win32::DefaultWin32WGLGraphicsOutput, kanzi::qnx::QnxEGLPBufferGraphicsOutput, kanzi::emscripten::DefaultEmscriptenGraphicsOutput, and kanzi::LegacyGraphicsOutput.

virtual KZ_NO_DISCARD optional<void*> kanzi::GLGraphicsOutput::getNativeContextHandle ( ) const
pure virtualnoexcept

Gets associated native GL context handle.

Returns
The handle of associated graphics context object, or nullopt on error.

Implemented in kanzi::qnx::DefaultQnxEGLGraphicsOutput, kanzi::win32::DefaultWin32WGLGraphicsOutput, kanzi::qnx::QnxEGLPBufferGraphicsOutput, kanzi::emscripten::DefaultEmscriptenGraphicsOutput, and kanzi::LegacyGraphicsOutput.

virtual KZ_NO_DISCARD optional<void*> kanzi::GLGraphicsOutput::getNativeSurfaceHandle ( ) const
pure virtualnoexcept

Gets associated native GL surface handle.

Returns
The handle of associated surface object, or nullopt on error.

Implemented in kanzi::qnx::DefaultQnxEGLGraphicsOutput, kanzi::win32::DefaultWin32WGLGraphicsOutput, kanzi::qnx::QnxEGLPBufferGraphicsOutput, kanzi::emscripten::DefaultEmscriptenGraphicsOutput, and kanzi::LegacyGraphicsOutput.

virtual KZ_NO_DISCARD optional<void*> kanzi::GLGraphicsOutput::createImage ( int  target,
void *  data,
int *  attributes 
)
pure virtualnoexcept

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().

Implemented in kanzi::qnx::DefaultQnxEGLGraphicsOutput, kanzi::win32::DefaultWin32WGLGraphicsOutput, kanzi::qnx::QnxEGLPBufferGraphicsOutput, kanzi::emscripten::DefaultEmscriptenGraphicsOutput, and kanzi::LegacyGraphicsOutput.

virtual bool kanzi::GLGraphicsOutput::destroyImage ( void *  image)
pure virtualnoexcept

Function for destroying native image object.

Parameters
imageImage to destroy.
Returns
True, on success.

Implemented in kanzi::qnx::DefaultQnxEGLGraphicsOutput, kanzi::win32::DefaultWin32WGLGraphicsOutput, kanzi::qnx::QnxEGLPBufferGraphicsOutput, kanzi::emscripten::DefaultEmscriptenGraphicsOutput, and kanzi::LegacyGraphicsOutput.

virtual KZ_NO_DISCARD optional<GraphicsContextAPI> kanzi::GLGraphicsOutput::getGraphicsContextAPI ( ) const
pure virtualnoexcept

Gets the API used by the associated graphics context.

Returns
Graphics context API, or nullopt on error.

Implemented in kanzi::win32::DefaultWin32WGLGraphicsOutput, kanzi::qnx::DefaultQnxEGLGraphicsOutput, kanzi::qnx::QnxEGLPBufferGraphicsOutput, kanzi::LegacyGraphicsOutput, and kanzi::emscripten::DefaultEmscriptenGraphicsOutput.

virtual KZ_NO_DISCARD optional<SurfaceClientAPI> kanzi::GLGraphicsOutput::getSurfaceClientAPI ( ) const
pure virtualnoexcept
virtual KZ_NO_DISCARD optional<SurfaceColorSpace> kanzi::GLGraphicsOutput::getColorSpace ( ) const
pure virtualnoexcept

Gets the color space used by the associated graphics context.

Returns
Color Space, or nullopt on error.

Implemented in kanzi::win32::DefaultWin32WGLGraphicsOutput, kanzi::qnx::DefaultQnxEGLGraphicsOutput, kanzi::qnx::QnxEGLPBufferGraphicsOutput, kanzi::LegacyGraphicsOutput, and kanzi::emscripten::DefaultEmscriptenGraphicsOutput.


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