|
SleakEngine 1.0.0
C++23 multi-backend game engine
|
#include <VertexLayout.hpp>
Public Attributes | |
| std::vector< VertexAttribute > | attributes |
| std::string | gbufferShaderStem |
| std::string | shaderStem |
| std::string | shadowShaderStem |
| uint32_t | stride = 0 |
| std::string | transparentShaderStem |
A complete custom vertex layout plus the shader stems that consume it. Register once at startup; the handle keys pipelines and mesh creation. Shader stems are consumed by the Vulkan backend; OpenGL instead binds the layout's attributes to its own fixed shader programs.
Fill one of these when your geometry does not fit the engine's built-in vertex type: packed voxel vertices, extra UV sets, per-vertex instance data, anything you want to define yourself. stride is the size of one vertex in bytes and each VertexAttribute gives a shader location, a component format, and a byte offset inside that vertex.
The four shader stems name the pipeline variants the format participates in. An empty stem skips that pass entirely, so a format with no shadowShaderStem casts no shadows and a format with no gbufferShaderStem is forward only. There is no fallback shader: if a named stem fails to load, the backend logs an error and skips that pass for this format.
Definition at line 74 of file VertexLayout.hpp.
| std::vector<VertexAttribute> Sleak::VertexLayoutDesc::attributes |
Definition at line 76 of file VertexLayout.hpp.
| std::string Sleak::VertexLayoutDesc::gbufferShaderStem |
Definition at line 81 of file VertexLayout.hpp.
| std::string Sleak::VertexLayoutDesc::shaderStem |
Definition at line 77 of file VertexLayout.hpp.
| std::string Sleak::VertexLayoutDesc::shadowShaderStem |
Definition at line 79 of file VertexLayout.hpp.
| uint32_t Sleak::VertexLayoutDesc::stride = 0 |
Definition at line 75 of file VertexLayout.hpp.
| std::string Sleak::VertexLayoutDesc::transparentShaderStem |
Definition at line 83 of file VertexLayout.hpp.