Chronos 0.0
A advanced 2D rendering and animation system
Loading...
Searching...
No Matches
Chronos::Engine::ColorVertex Struct Reference

This defines the position of a vertex. Used when we need a colored vertex. Does not support textures. More...

#include <Vertex.hpp>

Static Public Member Functions

static VkVertexInputBindingDescription getBindingDescription ()
 Creates a VkVertexInputBindingDescription for the vertex based on the size of the vertex.
 
static std::array< VkVertexInputAttributeDescription, 1 > getAttributeDescriptions ()
 Generates the VkVertexInputAttributeDescription for the vertex based on pos attribute of the vertex.
 

Public Attributes

glm::vec2 pos
 

Detailed Description

This defines the position of a vertex. Used when we need a colored vertex. Does not support textures.

Definition at line 39 of file Vertex.hpp.

Member Function Documentation

◆ getAttributeDescriptions()

static std::array< VkVertexInputAttributeDescription, 1 > Chronos::Engine::ColorVertex::getAttributeDescriptions ( )
inlinestatic

Generates the VkVertexInputAttributeDescription for the vertex based on pos attribute of the vertex.

Definition at line 61 of file Vertex.hpp.

62 {
63 std::array<VkVertexInputAttributeDescription, 1>
64 attributeDescriptions {};
65
66 attributeDescriptions[0].binding = 0;
67 attributeDescriptions[0].location = 0;
68 attributeDescriptions[0].format = VK_FORMAT_R32G32_SFLOAT;
69 attributeDescriptions[0].offset = offsetof(ColorVertex, pos);
70 return attributeDescriptions;
71 }

References pos.

Here is the caller graph for this function:

◆ getBindingDescription()

static VkVertexInputBindingDescription Chronos::Engine::ColorVertex::getBindingDescription ( )
inlinestatic

Creates a VkVertexInputBindingDescription for the vertex based on the size of the vertex.

Definition at line 46 of file Vertex.hpp.

47 {
48 VkVertexInputBindingDescription bindingDescription {};
49 bindingDescription.binding = 0;
50 bindingDescription.stride = sizeof(ColorVertex);
51 bindingDescription.inputRate = VK_VERTEX_INPUT_RATE_VERTEX;
52
53 return bindingDescription;
54 }
Here is the caller graph for this function:

Member Data Documentation

◆ pos

glm::vec2 Chronos::Engine::ColorVertex::pos

Definition at line 40 of file Vertex.hpp.


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