HikoGUI
A low latency retained GUI
Loading...
Searching...
No Matches
Public Member Functions | Data Fields
v1::gfx_surface Class Referenceabstract
Inheritance diagram for v1::gfx_surface:
v1::gfx_surface_vulkan v1::gui_window_vulkan_macos

Public Member Functions

 gfx_surface (const gfx_surface &)=delete
 
gfx_surfaceoperator= (const gfx_surface &)=delete
 
 gfx_surface (gfx_surface &&)=delete
 
gfx_surfaceoperator= (gfx_surface &&)=delete
 
virtual void init ()
 
 gfx_surface (gfx_system &system)
 
virtual void set_device (gfx_device *device) noexcept
 
gfx_devicedevice () const noexcept
 
virtual extent2 size () const noexcept=0
 Get the size of the surface.
 
virtual void update (extent2 new_size) noexcept=0
 Update the surface.
 
virtual std::optional< gfx_draw_context > render_start (aarectangle redraw_rectangle)=0
 
virtual void render_finish (gfx_draw_context const &context)=0
 
virtual void add_delegate (gfx_surface_delegate *delegate) noexcept=0
 Add a delegate to handle extra rendering.
 
virtual void remove_delegate (gfx_surface_delegate *delegate) noexcept=0
 Remove a delegate.
 

Data Fields

gfx_systemsystem
 
gfx_surface_state state = gfx_surface_state::has_window
 
gfx_surface_loss loss = gfx_surface_loss::none
 

Member Function Documentation

◆ add_delegate()

virtual void v1::gfx_surface::add_delegate ( gfx_surface_delegate * delegate)
pure virtualnoexcept

Add a delegate to handle extra rendering.

The delegate can render underneath the HikoGUI user interface.

Implemented in v1::gfx_surface_vulkan.

◆ remove_delegate()

virtual void v1::gfx_surface::remove_delegate ( gfx_surface_delegate * delegate)
pure virtualnoexcept

Remove a delegate.

Implemented in v1::gfx_surface_vulkan.

◆ set_device()

virtual void v1::gfx_surface::set_device ( gfx_device * device)
virtualnoexcept

Set GPU device to manage this window. Change of the device may be done at runtime.

Parameters
deviceThe device to use for rendering, may be nullptr.

Reimplemented in v1::gfx_surface_vulkan.

◆ size()

virtual extent2 v1::gfx_surface::size ( ) const
pure virtualnoexcept

Get the size of the surface.

Implemented in v1::gfx_surface_vulkan.

◆ update()

virtual void v1::gfx_surface::update ( extent2 new_size)
pure virtualnoexcept

Update the surface.

This function will check if the graphic pipeline and swapchain needs to be build, rebuild, or torn down.

Parameters
new_sizeThe size of the window.

Implemented in v1::gfx_surface_vulkan.


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