big refactoring ! ci skip

This commit is contained in:
2024-09-02 09:44:42 +02:00
parent d95233e728
commit f65ac577bc
581 changed files with 42971 additions and 99170 deletions

36
runtime/Includes/Renderer/Vertex.inl git.filemode.normal_file
View File

@@ -0,0 +1,36 @@
#pragma once
#include <Renderer/Vertex.h>
namespace mlx
{
VkVertexInputBindingDescription Vertex::GetBindingDescription()
{
VkVertexInputBindingDescription binding_description{};
binding_description.binding = 0;
binding_description.stride = sizeof(Vertex);
binding_description.inputRate = VK_VERTEX_INPUT_RATE_VERTEX;
return binding_description;
}
std::array<VkVertexInputAttributeDescription, 3> Vertex::GetAttributeDescriptions()
{
std::array<VkVertexInputAttributeDescription, 3> attribute_descriptions;
attribute_descriptions[0].binding = 0;
attribute_descriptions[0].location = 0;
attribute_descriptions[0].format = VK_FORMAT_R32G32_SFLOAT;
attribute_descriptions[0].offset = offsetof(Vertex, position);
attribute_descriptions[1].binding = 0;
attribute_descriptions[1].location = 1;
attribute_descriptions[1].format = VK_FORMAT_R32G32B32A32_SFLOAT;
attribute_descriptions[1].offset = offsetof(Vertex, color);
attribute_descriptions[2].binding = 0;
attribute_descriptions[2].location = 2;
attribute_descriptions[2].format = VK_FORMAT_R32G32_SFLOAT;
attribute_descriptions[2].offset = offsetof(Vertex, uv);
return attribute_descriptions;
}
}