mirror of
https://github.com/Kbz-8/42_vox.git
synced 2026-01-11 14:43:34 +00:00
initial commit
This commit is contained in:
28
ScopEngine/Runtime/Includes/Renderer/Vertex.h
git.filemode.normal_file
28
ScopEngine/Runtime/Includes/Renderer/Vertex.h
git.filemode.normal_file
@@ -0,0 +1,28 @@
|
||||
#ifndef __SCOP_VERTEX__
|
||||
#define __SCOP_VERTEX__
|
||||
|
||||
#include <kvf.h>
|
||||
#include <array>
|
||||
#include <Maths/Vec4.h>
|
||||
#include <Maths/Vec2.h>
|
||||
|
||||
namespace Scop
|
||||
{
|
||||
struct Vertex
|
||||
{
|
||||
alignas(16) Vec4f position = Vec4f{ 0.0f, 0.0f, 0.0f, 1.0f };
|
||||
alignas(16) Vec4f color = Vec4f{ 1.0f, 1.0f, 1.0f, 1.0f };
|
||||
alignas(16) Vec4f normal = Vec4f{ 0.0f, 0.0f, 0.0f, 1.0f };
|
||||
alignas(16) Vec2f uv = Vec2f{ 0.0f, 0.0f };
|
||||
|
||||
Vertex() = default;
|
||||
Vertex(Vec4f p, Vec4f c, Vec4f n, Vec2f u) : position(std::move(p)), color(std::move(c)), normal(std::move(n)), uv(std::move(u)) {}
|
||||
|
||||
[[nodiscard]] inline static VkVertexInputBindingDescription GetBindingDescription();
|
||||
[[nodiscard]] inline static std::array<VkVertexInputAttributeDescription, 4> GetAttributeDescriptions();
|
||||
};
|
||||
}
|
||||
|
||||
#include <Renderer/Vertex.inl>
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user