Vulkan Schnee 0.0.1
High-performance rendering engine
Loading...
Searching...
No Matches
Vertex Struct Reference

The fundamental building block of all meshes in this engine. More...

#include <Vertex.h>

Public Member Functions

 Vertex ()=default
 Vertex (glm::vec3 pos)

Public Attributes

glm::vec4 position = glm::vec4(0.0f)
glm::vec4 normal = glm::vec4(0.0f)
glm::vec4 tangent = glm::vec4(0.0f, 0.0f, 0.0f, 1.0f)
glm::vec2 textureCoordinate = glm::vec2(0.0f)
glm::vec2 lightmapUvCoordinate = glm::vec2(0.0f)

Detailed Description

The fundamental building block of all meshes in this engine.

Layout matches GLSL std430. Uses vec4 for position/normal/tangent to avoid vec3 alignment issues (vec3 has 16-byte alignment in std430).

Size: 64 bytes (was 40 bytes before tangent addition)

Date
2026-01-21 - Added tangent for normal mapping support

Definition at line 15 of file Vertex.h.

Constructor & Destructor Documentation

◆ Vertex() [1/2]

Vertex::Vertex ( )
default

◆ Vertex() [2/2]

Vertex::Vertex ( glm::vec3 pos)
inline

Definition at line 17 of file Vertex.h.

References position.

Member Data Documentation

◆ lightmapUvCoordinate

glm::vec2 Vertex::lightmapUvCoordinate = glm::vec2(0.0f)

Definition at line 23 of file Vertex.h.

Referenced by EngineCore::GltfLoader::loadPrimitiveData().

◆ normal

◆ position

◆ tangent

glm::vec4 Vertex::tangent = glm::vec4(0.0f, 0.0f, 0.0f, 1.0f)

Definition at line 21 of file Vertex.h.

Referenced by EngineCore::GltfLoader::loadPrimitiveData().

◆ textureCoordinate

glm::vec2 Vertex::textureCoordinate = glm::vec2(0.0f)

The documentation for this struct was generated from the following file:
  • /home/magerbeton/Documents/gl3-vulkan/Engine/include/Engine/Mesh/Vertex.h