Class representing a default Emscripten graphics output. More...
#include <kanzi/core.ui/platform/graphics_output/emscripten/default_emscripten_graphics_output.hpp>
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... | |
DefaultEmscriptenGraphicsOutput (const DefaultEGLGraphicsOutputProperties &properties) | |
Constructor. More... | |
bool | destroyImage (void *image) noexcept override |
Destroys an EGL image. More... | |
void | gatherEvents (EventQueue &queue) override |
Amends the given event queue with events received so far. More... | |
KZ_NO_DISCARD optional< SurfaceColorSpace > | getColorSpace () const noexcept override |
Gets the color space used by the associated graphics context. More... | |
KZ_NO_DISCARD optional< GraphicsContextAPI > | getGraphicsContextAPI () 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... | |
KZ_NO_DISCARD optional< NativeEventHandle > | getNativeEventHandle () 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... | |
KZ_NO_DISCARD optional< SurfaceClientAPI > | getSurfaceClientAPI () const noexcept override |
Gets the type of the associated graphics surface. More... | |
KZ_NO_DISCARD Matrix4x4 | getTargetTransformation () const noexcept override |
Returns the target transformation. More... | |
KZ_NO_DISCARD optional< unsigned int > | getWindowHeight () const noexcept |
Returns the active window height. More... | |
KZ_NO_DISCARD optional< unsigned int > | getWindowWidth () const noexcept |
Returns the active window width. More... | |
void | logWindowSize () const noexcept |
Prints the active window size to log. More... | |
bool | makeCurrent () noexcept override |
Make the current EGL thread active. More... | |
bool | releaseCurrent () noexcept override |
Makes the currently active graphics output inactive for the current thread. More... | |
bool | swapBuffers () override |
Posts rendering results. More... | |
bool | swapInterval (int interval) override |
Sets minimum number of displayed video frames before a buffer swap. More... | |
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... | |
bool | 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... | |
Class representing a default Emscripten graphics output.
|
explicit |
Constructor.
properties | Specifies properties to request for the graphics output. |
|
noexcept |
Prints the active window size to log.
|
overridevirtual |
Amends the given event queue with events received so far.
queue | Event queue to be amended. Do not clear nor assume to be empty. |
Implements kanzi::EventSource.
|
overridevirtualnoexcept |
Returns a waitable event handle for this event source, if available.
nullopt | Getting the event handle failed. |
Implements kanzi::EventSource.
|
overridevirtual |
Retrieves pointer to GL function.
functionName | Name of the function. |
Implements kanzi::GLGraphicsOutput.
|
overridevirtualnoexcept |
Make the current EGL thread active.
Implements kanzi::GLGraphicsOutput.
|
overridevirtualnoexcept |
Makes the currently active graphics output inactive for the current thread.
Implements kanzi::GLGraphicsOutput.
|
overridevirtual |
Posts rendering results.
Implicitly flushes the rendering pipeline and executes all received rendering commands before posting.
Implements kanzi::GLGraphicsOutput.
|
overridevirtual |
Sets minimum number of displayed video frames before a buffer swap.
interval | Minimum number of video frames to wait before buffer swap. |
Implements kanzi::GLGraphicsOutput.
|
overridevirtualnoexcept |
Returns the target transformation.
Implements kanzi::GLGraphicsOutput.
|
overridevirtualnoexcept |
Gets the API used by the associated graphics context.
nullopt | Getting the graphics context failed. |
Implements kanzi::GLGraphicsOutput.
|
overridevirtualnoexcept |
Gets the type of the associated graphics surface.
nullopt | Getting the graphics surface failed. |
Implements kanzi::GLGraphicsOutput.
|
overridevirtualnoexcept |
Gets the color space used by the associated graphics context.
nullopt | Getting the color space failed. |
Implements kanzi::GLGraphicsOutput.
|
overridevirtualnoexcept |
Gets associated native GL display handle.
nullopt | Getting GL display failed. |
Implements kanzi::GLGraphicsOutput.
|
overridevirtualnoexcept |
Gets associated native GL context handle.
nullopt | Getting GL context failed. |
Implements kanzi::GLGraphicsOutput.
|
overridevirtualnoexcept |
Gets associated native GL surface handle.
nullopt | Getting GL surface failed. |
Implements kanzi::GLGraphicsOutput.
|
overridevirtualnoexcept |
Function for creating native image object, which can be shared between client APIs.
The returned image must be destroyed using destroyImage().
target | Context-specific target specifier. |
data | Data to use as image contents. |
attributes | Context-specific attributes list. |
Implements kanzi::GLGraphicsOutput.
|
overridevirtualnoexcept |
Destroys an EGL image.
image | EGL image to destroy. |
Implements kanzi::GLGraphicsOutput.
|
noexcept |
Returns the active window width.
nullopt | Getting the width failed. |
|
noexcept |
Returns the active window height.
nullopt | Getting the height failed. |
|
inlineprotectednoexcept |
Sets the target transformation.
targetTransformation | The target transformation matrix. |
|
protectednoexcept |
Updates all cached values from given layout size.
width | Layout area width in pixels. |
height | Layout area height in pixels. |