Kanzi  3.9.9
Kanzi Engine C++ 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 bool kanzi::GLGraphicsOutput::swapBuffers ( )
pure virtual
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::wayland::DefaultWaylandEGLGraphicsOutput, kanzi::wayland::DefaultWaylandIVIEGLGraphicsOutput, kanzi::qnx::DefaultQnxEGLGraphicsOutput, kanzi::qnx::QnxEGLPBufferGraphicsOutput, kanzi::x11::DefaultX11EGLGraphicsOutput, kanzi::android_ws::DefaultAndroidWSEGLGraphicsOutput, 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::wayland::DefaultWaylandEGLGraphicsOutput, kanzi::wayland::DefaultWaylandIVIEGLGraphicsOutput, kanzi::x11::DefaultX11EGLGraphicsOutput, kanzi::qnx::DefaultQnxEGLGraphicsOutput, kanzi::qnx::QnxEGLPBufferGraphicsOutput, kanzi::android_ws::DefaultAndroidWSEGLGraphicsOutput, 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::android_ws::DefaultAndroidWSEGLGraphicsOutput, kanzi::emscripten::DefaultEmscriptenGraphicsOutput, kanzi::wayland::DefaultWaylandEGLGraphicsOutput, kanzi::wayland::DefaultWaylandIVIEGLGraphicsOutput, kanzi::x11::DefaultX11EGLGraphicsOutput, and kanzi::LegacyGraphicsOutput.


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