Kanzi Engine API
kanzi::DefaultGlGraphicsOutput Class Reference

DefaultGlGraphicsOutput class. More...

#include <kanzi/core.ui/platform/graphics_output/default/default_gl_graphics_output.hpp>

Inheritance diagram for kanzi::DefaultGlGraphicsOutput:
[legend]

Public Member Functions

void activate () override
 Makes the graphics output active for the current thread. More...
 
void * createImage (void *context, int target, void *data, int *attributes) override
 Function for creating native image object, which can be shared between client APIs. More...
 
 DefaultGlGraphicsOutput (const struct KzsSurfaceProperties *surfaceProperties, const NativeWindowProperties *windowProperties)
 Constructor. More...
 
 DefaultGlGraphicsOutput (NativeWindowHandle handle, const struct KzsSurfaceProperties *surfaceProperties, const NativeWindowProperties *windowProperties)
 Constructor. More...
 
void destroyImage (void *image) override
 Function for destroying native image object. More...
 
SurfaceColorSpace getColorSpace () const override
 Gets the color space of the graphics context. More...
 
void * getContextHandle () const override
 Gets the handle of associated graphics context object. More...
 
struct KzsDesktopgetDesktop () const
 Gets associated legacy desktop. More...
 
struct KzsDisplaygetDisplay (size_t index) const
 Access associated legacy display by index. More...
 
void * getDisplayHandle () const override
 Gets the handle of display associated to the graphics output. More...
 
KzsGraphicsContextAPI getGraphicsContextAPI () const override
 Gets the API used by the associated graphics context. More...
 
NativeInputHandle getNativeInputHandle ()
 Gets the associated native input handle. More...
 
kzsGLProcPointer getProcAddress (string_view functionName) override
 Gets pointer to graphics API function. More...
 
struct KzsSurfacegetSurface () const
 Gets associated legacy surface. More...
 
KzsSurfaceType getSurfaceType () const override
 Gets the type of the associated graphics surface. More...
 
struct KzsWindowgetWindow () const
 Gets associated legacy window. More...
 
void handleEvents (EventQueue &eventQueue) override
 Handles the window resize event. More...
 
void logExtensions () const override
 Logs the extensions of the graphics context. More...
 
void logProperties () const override
 Logs the properties of the graphics output. More...
 
void present () override
 Posts rendering results. More...
 
void setSwapInterval (int interval) override
 Sets the swap interval of the associated graphics implementation. More...
 
 ~DefaultGlGraphicsOutput () override
 Destructor. More...
 
- Public Member Functions inherited from kanzi::GlGraphicsOutput
 GlGraphicsOutput ()
 Constructor. More...
 
 ~GlGraphicsOutput () override
 Destructor. More...
 
- Public Member Functions inherited from kanzi::GraphicsOutput
unsigned int getHeight () const
 Returns the height of the rendering area. More...
 
enum KzsDisplayOrientationAngle getOrientationAngle () const
 Returns the orientations of the rendering area. More...
 
unsigned int getWidth () const
 Returns the width of the rendering area. More...
 
 GraphicsOutput ()
 Constructor. More...
 
virtual ~GraphicsOutput ()
 Destructor. More...
 
- Public Member Functions inherited from kanzi::WindowedGraphicsOutput
NativeWindowHandle getNativeWindowHandle ()
 Gets the associated window handle. More...
 
void resize (unsigned int width, unsigned int height)
 Resizes the rendering area. More...
 
void setWindowTitle (string_view title)
 Sets the window title, if possible. More...
 
 WindowedGraphicsOutput ()
 Constructor. More...
 
virtual ~WindowedGraphicsOutput ()
 Destructor. More...
 

Protected Member Functions

NativeWindowHandle getNativeWindowHandleOverride () override
 Gets the associated window handle. More...
 
void resizeOverride (unsigned int width, unsigned int height) override
 Resizes the rendering area. More...
 
void setWindowTitleOverride (string_view title) override
 Sets the window title. More...
 
void updateSizeFromWindow ()
 Resizes the surface and rendering area to match window size. More...
 
- Protected Member Functions inherited from kanzi::GraphicsOutput
void updateSize (unsigned int width, unsigned int height)
 Updates the rendering area size. More...
 

Protected Attributes

struct KzsDesktopm_desktop
 Legacy desktop for application. More...
 
struct KzsSurfacem_surface
 System-dependent surface implementation. More...
 
struct KzsWindowm_window
 System-dependent window implementation. More...
 

Detailed Description

DefaultGlGraphicsOutput class.

A graphics output implementation that provides basic GL rendering output.

Constructor & Destructor Documentation

kanzi::DefaultGlGraphicsOutput::DefaultGlGraphicsOutput ( const struct KzsSurfaceProperties surfaceProperties,
const NativeWindowProperties windowProperties 
)
explicit

Constructor.

Parameters
surfacePropertiesSpecifies properties to request for the associated GL surface.
windowPropertiesSpecifies properties to request for the associated window.
kanzi::DefaultGlGraphicsOutput::DefaultGlGraphicsOutput ( NativeWindowHandle  handle,
const struct KzsSurfaceProperties surfaceProperties,
const NativeWindowProperties windowProperties 
)
explicit

Constructor.

Parameters
handleHandle to an existing window.
surfacePropertiesSpecifies properties to request for the associated GL surface.
windowPropertiesSpecifies properties to request for the window.
kanzi::DefaultGlGraphicsOutput::~DefaultGlGraphicsOutput ( )
override

Destructor.

Member Function Documentation

kzsGLProcPointer kanzi::DefaultGlGraphicsOutput::getProcAddress ( string_view  functionName)
overridevirtual

Gets pointer to graphics API function.

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

Implements kanzi::GlGraphicsOutput.

void kanzi::DefaultGlGraphicsOutput::activate ( )
overridevirtual

Makes the graphics output active for the current thread.

Implements kanzi::GlGraphicsOutput.

void kanzi::DefaultGlGraphicsOutput::present ( )
overridevirtual

Posts rendering results.

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

See also
setSwapInterval().

Implements kanzi::GraphicsOutput.

void kanzi::DefaultGlGraphicsOutput::setSwapInterval ( int  interval)
overridevirtual

Sets the swap interval of the associated graphics implementation.

Parameters
intervalSpecifies the minimum number of video frame periods per buffer swap. Negative interval values are reserved for platform-specific special cases.
See also
swapBuffers().

Implements kanzi::GlGraphicsOutput.

void* kanzi::DefaultGlGraphicsOutput::getContextHandle ( ) const
overridevirtual

Gets the handle of associated graphics context object.

Returns
The handle of associated graphics context object.

Implements kanzi::GlGraphicsOutput.

void* kanzi::DefaultGlGraphicsOutput::createImage ( void *  context,
int  target,
void *  data,
int *  attributes 
)
overridevirtual

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

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

Implements kanzi::GlGraphicsOutput.

void kanzi::DefaultGlGraphicsOutput::destroyImage ( void *  image)
overridevirtual

Function for destroying native image object.

Parameters
imageImage to destroy.

Implements kanzi::GlGraphicsOutput.

void kanzi::DefaultGlGraphicsOutput::handleEvents ( EventQueue eventQueue)
overridevirtual

Handles the window resize event.

Parameters
eventQueueQueue holding the events to handle.

Implements kanzi::GraphicsOutput.

void kanzi::DefaultGlGraphicsOutput::logProperties ( ) const
overridevirtual

Logs the properties of the graphics output.

Implements kanzi::GlGraphicsOutput.

void kanzi::DefaultGlGraphicsOutput::logExtensions ( ) const
overridevirtual

Logs the extensions of the graphics context.

Implements kanzi::GlGraphicsOutput.

NativeInputHandle kanzi::DefaultGlGraphicsOutput::getNativeInputHandle ( )

Gets the associated native input handle.

struct KzsDesktop* kanzi::DefaultGlGraphicsOutput::getDesktop ( ) const

Gets associated legacy desktop.

Returns
Desktop.
struct KzsWindow* kanzi::DefaultGlGraphicsOutput::getWindow ( ) const

Gets associated legacy window.

Returns
Window.
struct KzsSurface* kanzi::DefaultGlGraphicsOutput::getSurface ( ) const

Gets associated legacy surface.

Returns
Surface.
struct KzsDisplay* kanzi::DefaultGlGraphicsOutput::getDisplay ( size_t  index) const

Access associated legacy display by index.

Parameters
indexDisplay index to access.
Returns
Display at given index or 0.
KzsGraphicsContextAPI kanzi::DefaultGlGraphicsOutput::getGraphicsContextAPI ( ) const
overridevirtual

Gets the API used by the associated graphics context.

Returns
Graphics context API.

Implements kanzi::GlGraphicsOutput.

KzsSurfaceType kanzi::DefaultGlGraphicsOutput::getSurfaceType ( ) const
overridevirtual

Gets the type of the associated graphics surface.

Returns
Surface type.

Implements kanzi::GlGraphicsOutput.

SurfaceColorSpace kanzi::DefaultGlGraphicsOutput::getColorSpace ( ) const
overridevirtual

Gets the color space of the graphics context.

Returns
Color Space.

Implements kanzi::GlGraphicsOutput.

void* kanzi::DefaultGlGraphicsOutput::getDisplayHandle ( ) const
overridevirtual

Gets the handle of display associated to the graphics output.

Returns
The handle of display associated to the graphics output.

Implements kanzi::GlGraphicsOutput.

void kanzi::DefaultGlGraphicsOutput::resizeOverride ( unsigned int  width,
unsigned int  height 
)
overrideprotectedvirtual

Resizes the rendering area.

Implements kanzi::WindowedGraphicsOutput.

void kanzi::DefaultGlGraphicsOutput::setWindowTitleOverride ( string_view  title)
overrideprotectedvirtual

Sets the window title.

Implements kanzi::WindowedGraphicsOutput.

NativeWindowHandle kanzi::DefaultGlGraphicsOutput::getNativeWindowHandleOverride ( )
overrideprotectedvirtual

Gets the associated window handle.

Implements kanzi::WindowedGraphicsOutput.

void kanzi::DefaultGlGraphicsOutput::updateSizeFromWindow ( )
protected

Resizes the surface and rendering area to match window size.

Member Data Documentation

struct KzsDesktop* kanzi::DefaultGlGraphicsOutput::m_desktop
protected

Legacy desktop for application.

struct KzsWindow* kanzi::DefaultGlGraphicsOutput::m_window
protected

System-dependent window implementation.

struct KzsSurface* kanzi::DefaultGlGraphicsOutput::m_surface
protected

System-dependent surface implementation.


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