HikoGUI
A low latency retained GUI
Loading...
Searching...
No Matches
PipelineSDF_Vertex.hpp
1// Copyright 2019 Pokitec
2// All rights reserved.
3
4#pragma once
5
6#include "TTauri/Foundation/vec.hpp"
7#include "TTauri/Foundation/aarect.hpp"
8#include "TTauri/Foundation/R16G16B16A16SFloat.hpp"
9#include "TTauri/Foundation/R32G32B32A32SFloat.hpp"
10#include "TTauri/Foundation/R32G32B32SFloat.hpp"
11#include <vulkan/vulkan.hpp>
12
13namespace tt::PipelineSDF {
14
18struct Vertex {
21
24
27
30
35 color(color) {}
36
37 static vk::VertexInputBindingDescription inputBindingDescription()
38 {
39 return {
40 0, sizeof(Vertex), vk::VertexInputRate::eVertex
41 };
42 }
43
44 static std::vector<vk::VertexInputAttributeDescription> inputAttributeDescriptions()
45 {
46 return {
47 { 0, 0, vk::Format::eR32G32B32Sfloat, offsetof(Vertex, position) },
48 { 1, 0, vk::Format::eR32G32B32A32Sfloat, offsetof(Vertex, clippingRectangle) },
49 { 2, 0, vk::Format::eR32G32B32Sfloat, offsetof(Vertex, textureCoord) },
50 { 3, 0, vk::Format::eR16G16B16A16Sfloat, offsetof(Vertex, color) }
51 };
52 }
53};
54}
Class which represents an axis-aligned rectangle.
Definition aarect.hpp:13
Definition R16G16B16A16SFloat.hpp:15
Definition R32G32B32A32SFloat.hpp:13
Definition R32G32B32SFloat.hpp:13
A 4D vector.
Definition vec.hpp:37
Definition PipelineSDF_Vertex.hpp:18
R16G16B16A16SFloat color
The color of the glyph.
Definition PipelineSDF_Vertex.hpp:29
R32G32B32A32SFloat clippingRectangle
Clipping rectangle. (x,y)=bottom-left, (z,w)=top-right.
Definition PipelineSDF_Vertex.hpp:23
R32G32B32SFloat position
The pixel-coordinates where the origin is located relative to the bottom-left corner of the window.
Definition PipelineSDF_Vertex.hpp:20
R32G32B32SFloat textureCoord
The x, y (relative to bottom-left) coordinate inside the texture-atlas, z is used as an index in the ...
Definition PipelineSDF_Vertex.hpp:26