Game materials
Generated from engine/render/material.h at aceb130. The text under each declaration is the header's own comment, word for word. About the reference says how these pages are made.
Audience: game code.
#include "engine/render/material.h" · namespace labrador
enum class MaterialKind
Section titled “enum class MaterialKind”{ d3d11, d3d12, spirv, glsl, null,};struct MaterialSource
Section titled “struct MaterialSource”Build output from labrador_add_material. The selected backend determines the kind: Direct3D bytecode, SPIR-V, NUL-terminated GLSL, or empty null data. name identifies the authored source in a runtime diagnostic. Renderer::add_material copies both spans; their storage need not survive it.
std::span<const unsigned char> bytes;std::string_view name;class MaterialHandle
Section titled “class MaterialHandle”A material registered with one Renderer. Default construction is unresolved. Handles survive resize and device restoration and expire with their renderer; another renderer refuses them.
MaterialHandle
Section titled “MaterialHandle”valid · index
Section titled “valid · index”bool valid() const;int index() const;operator==
Section titled “operator==”Related types
Section titled “Related types”Named in the public declarations above: MaterialTable.
In the samples and tests
Section titled “In the samples and tests”The files that include this header directly. A file can also reach it through another header.
tests/render/gl/material_tests.cpptests/render/material_null_tests.cpp,material_pixel_tests.cpp,material_tests.cpp
Explained in
Section titled “Explained in”Development documentation (unreleased). Built from Labrador aceb130 of 2026-11-20.