Vulkan Schnee 0.0.1 (22840dc8)
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
 Creates a zero-initialized vertex.
 Vertex (glm::vec3 pos)
 Creates a vertex with only the position initialized.

Public Attributes

glm::vec4 position = glm::vec4(0.0f)
 xyz = position, w = unused.
glm::vec4 normal = glm::vec4(0.0f)
 xyz = normal, w = unused.
glm::vec4 tangent = glm::vec4(0.0f, 0.0f, 0.0f, 1.0f)
 xyz = tangent, w = handedness (+1/-1).
glm::vec2 textureCoordinate = glm::vec2(0.0f)
 Primary texture coordinates.
glm::vec2 lightmapUvCoordinate = glm::vec2(0.0f)
 Lightmap texture coordinates.

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

Creates a zero-initialized vertex.

◆ Vertex() [2/2]

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

Creates a vertex with only the position initialized.

Parameters
posVertex position.

Definition at line 25 of file Vertex.h.

References position.

Member Data Documentation

◆ lightmapUvCoordinate

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

Lightmap texture coordinates.

Definition at line 31 of file Vertex.h.

◆ normal

glm::vec4 Vertex::normal = glm::vec4(0.0f)

xyz = normal, w = unused.

Definition at line 28 of file Vertex.h.

◆ position

glm::vec4 Vertex::position = glm::vec4(0.0f)

xyz = position, w = unused.

Definition at line 27 of file Vertex.h.

Referenced by Vertex().

◆ tangent

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

xyz = tangent, w = handedness (+1/-1).

Definition at line 29 of file Vertex.h.

◆ textureCoordinate

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

Primary texture coordinates.

Definition at line 30 of file Vertex.h.


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