|
HikoGUI
A low latency retained GUI
|
Files | |
| file | pixmap.hpp |
| Defines the pixmap type. | |
| file | pixmap_span.hpp |
| Defines the pixmap_span type. | |
| file | sdf_r8.hpp |
| Defines the signed distance field pixel type sdf_r8. | |
| file | sfloat_rg32.hpp |
| Defines the sfloat_rg32. | |
| file | sfloat_rgb32.hpp |
| Defines the sfloat_rgb32. | |
| file | sfloat_rgba16.hpp |
| Defines the sfloat_rgba16. | |
| file | sfloat_rgba32.hpp |
| Defines the sfloat_rgba32. | |
| file | sfloat_rgba32x4.hpp |
| Defines 4x4 matrix type sfloat_rgba32x4. | |
| file | sint_abgr8_pack.hpp |
| Defines the sint_abgr8_pack type. | |
| file | snorm_r8.hpp |
| Defines the snorm_r8. | |
| file | srgb_abgr8_pack.hpp |
| Defines the srgb_abgr8_pack type. | |
| file | uint_abgr8_pack.hpp |
| Defines the uint_abgr8_pack type. | |
| file | unorm_a2bgr10_pack.hpp |
| Defines the unorm_a2bgr10_pack type. | |
Data Structures | |
| class | hi::v1::pixmap< T, Allocator > |
| A 2D pixel-based image. More... | |
| class | hi::v1::pixmap_span< T > |
| A non-owning 2D pixel-based image. More... | |
| struct | v1::sdf_r8 |
| A pixel of a single channel signed distance field. More... | |
| class | v1::sfloat_rg32 |
| 2 x float32 pixel format. More... | |
| class | v1::sfloat_rgb32 |
| 3 x float32 pixel format. More... | |
| class | v1::sfloat_rgba16 |
| 4 x half pixel format. More... | |
| class | v1::sfloat_rgba32 |
| 4 x float32 pixel format. More... | |
| class | v1::sfloat_rgba32x4 |
| 4 x 4 x float32 pixel format. More... | |
| class | v1::sint_abgr8_pack |
| 4 x int8_t packed pixel format. More... | |
| struct | v1::snorm_r8 |
| 1 x int8_t pixel format. More... | |
| class | v1::srgb_abgr8_pack |
| 4 x uint8_t pixel packed format with sRGB transfer function. More... | |
| class | v1::uint_abgr8_pack |
| 4 x uint8_t pixel packed format. More... | |
| struct | v1::unorm_a2bgr10_pack |
| 1 x uint2_t, 3 x uint10_t pixel packed format. More... | |
Image types and pixel formats.
| HikoGUI type | Vulkan format | Comment |
|---|---|---|
sfloat_rg32 | VK_FORMAT_R32G32_SFLOAT | |
sfloat_rgb32 | VK_FORMAT_R32G32B32_SFLOAT | |
sfloat_rgba16 | VK_FORMAT_R16G16B16A16_SFLOAT | The default HikoGUI image format. |
sfloat_rgba32 | VK_FORMAT_R32G32B32A32_SFLOAT | |
sfloat_rgba32x4 | 4 x VK_FORMAT_R32G32B32A32_SFLOAT | Used for 4x4 matrix |
snorm_r8 | VK_FORMAT_R8_SNORM | |
int_abgr8_pack | VK_FORMAT_A8B8G8R8_SINT_PACK32 | |
uint_abgr8_pack | VK_FORMAT_A8B8G8R8_UINT_PACK32 | |
srgb_abgr8_pack | VK_FORMAT_A8B8G8R8_SRGB_PACK32 | |
unorm_a2bgr10_pack | VK_FORMAT_A2R10G10B10_UNORM_PACK32 | |
sdf_r8 | VK_FORMAT_R8_SNORM | To store signed-distance-field. |
Color format types are used in vertex arrays and images when communicating with the GPU.
The types have the following syntax: numeric-type _ color-components [ _pack ]
| Type | Description |
|---|---|
| snorm | Signed integer mapped to the floating point range between -1.0 and 1.0. |
| unorm | Unsigned integer mapped to the floating point range between 0.0 and 1.0. |
| sint | Signed integer. |
| uint | Unsigned integer. |
| float | Floating point number. |
| srgb | Non-linear sRGB format for the RGB component, the alpha remains linear. |
The color components are the lower case letters: r, g, b & a. The ordering of the letters describe the order of the color components in memory. A number describes the number of bits of each component before it.
Here are a few examples of components:
| Combination | Description |
|---|---|
| rgba32 | 32 bits per component red, green, blue & alpha. |
| rgba16 | 16 bits per component red, green, blue & alpha. |
| rgba8 | 8 bits per component red, green, blue & alpha. |
| rgb8 | 8 bits per component red, green, blue. |
| rg8 | 8 bits per component red, green. |
| r8 | 8 bits per component red. |
| abgr8 | 8 bits per component alpha, blue, green & red. |
| a2bgr10 | 2 bit alpha, 10 bits per component blue, green & red |
If the format is non-packed, then each color component must be 8, 16, 32 or 64 bits in size. Each color component is stored in memory in native-byte-order, and the components are ordered with in increasing memory addresses.
If the format is packed, then the color components are packed together in a single integer. The color components are packed inside the integer from msb to lsb. The integers are 8, 16, 32, 64 or 128 bits in size. The integer is stored in memory in native-byte-order.