HikoGUI
A low latency retained GUI
Loading...
Searching...
No Matches
pipeline_image_vertex.hpp
1// Copyright Take Vos 2019-2020.
2// Distributed under the Boost Software License, Version 1.0.
3// (See accompanying file LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt)
4
5#pragma once
6
7#include "pipeline_image_image_location.hpp"
8#include "../numeric_array.hpp"
9#include "../aarect.hpp"
10#include "../color/sfloat_rgb32.hpp"
11#include "../color/sfloat_rgba32.hpp"
12#include <vulkan/vulkan.hpp>
13
14namespace tt::pipeline_image {
15
19struct vertex {
22
25
28
33
34 static vk::VertexInputBindingDescription inputBindingDescription()
35 {
36 return {
37 0, sizeof(vertex), vk::VertexInputRate::eVertex
38 };
39 }
40
41 static std::vector<vk::VertexInputAttributeDescription> inputAttributeDescriptions()
42 {
43 return {
44 { 0, 0, vk::Format::eR32G32B32Sfloat, offsetof(vertex, position) },
45 { 1, 0, vk::Format::eR32G32B32A32Sfloat, offsetof(vertex, clippingRectangle) },
46 { 2, 0, vk::Format::eR32G32B32Sfloat, offsetof(vertex, atlasPosition) },
47 };
48 }
49};
50}
Definition sfloat_rgb32.hpp:14
Definition sfloat_rgba32.hpp:14
Definition pipeline_image_vertex.hpp:19
sfloat_rgb32 position
The pixel-coordinates where the origin is located relative to the bottom-left corner of the window.
Definition pipeline_image_vertex.hpp:21
sfloat_rgb32 atlasPosition
The x, y coordinate inside the texture-atlas, z is used as an index in the texture-atlas array.
Definition pipeline_image_vertex.hpp:27
sfloat_rgba32 clippingRectangle
The position in pixels of the clipping rectangle relative to the bottom-left corner of the window,...
Definition pipeline_image_vertex.hpp:24