HikoGUI
A low latency retained GUI
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Data Fields
hi::v1::gfx_pipeline_box::vertex Struct Reference

#include <hikogui/GFX/gfx_pipeline_box_vulkan_intf.hpp>

Public Member Functions

 vertex (sfloat_rgba32 position, sfloat_rgba32 clipping_rectangle, sfloat_rgba32 corner_coordinate, sfloat_rgba32 corner_radii, sfloat_rgba16 fill_color, sfloat_rgba16 line_color, float line_width) noexcept
 

Static Public Member Functions

static vk::VertexInputBindingDescription inputBindingDescription ()
 
static std::vector< vk::VertexInputAttributeDescription > inputAttributeDescriptions ()
 

Data Fields

sfloat_rgba32 position
 The pixel-coordinates where the origin is located relative to the bottom-left corner of the window.
 
sfloat_rgba32 clipping_rectangle
 The position in pixels of the clipping rectangle relative to the bottom-left corner of the window, and extent in pixels.
 
sfloat_rgba32 corner_coordinate
 Double 2D coordinates inside the quad, used to determine the distance from the sides and corner inside the fragment shader.
 
sfloat_rgba32 corner_radii
 Shape of each corner, negative values are cut corners, positive values are rounded corners.
 
sfloat_rgba16 fill_color
 background color of the box.
 
sfloat_rgba16 line_color
 border color of the box.
 
float line_width
 

Detailed Description

A vertex defining a rectangle on a window. The vertex shader will convert window pixel-coordinates to normalized projection-coordinates.

Field Documentation

◆ clipping_rectangle

sfloat_rgba32 hi::v1::gfx_pipeline_box::vertex::clipping_rectangle

The position in pixels of the clipping rectangle relative to the bottom-left corner of the window, and extent in pixels.

◆ corner_coordinate

sfloat_rgba32 hi::v1::gfx_pipeline_box::vertex::corner_coordinate

Double 2D coordinates inside the quad, used to determine the distance from the sides and corner inside the fragment shader.

x = Number of pixels to the right from the left edge of the quad. y = Number of pixels above the bottom edge. z = Number of pixels to the left from the right edge of the quad. w = Number of pixels below the top edge.

The rasteriser will interpolate these numbers, so that inside the fragment shader the distance from a corner can be determined easily.

◆ corner_radii

sfloat_rgba32 hi::v1::gfx_pipeline_box::vertex::corner_radii

Shape of each corner, negative values are cut corners, positive values are rounded corners.

◆ fill_color

sfloat_rgba16 hi::v1::gfx_pipeline_box::vertex::fill_color

background color of the box.

◆ line_color

sfloat_rgba16 hi::v1::gfx_pipeline_box::vertex::line_color

border color of the box.

◆ position

sfloat_rgba32 hi::v1::gfx_pipeline_box::vertex::position

The pixel-coordinates where the origin is located relative to the bottom-left corner of the window.


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