aboutsummaryrefslogtreecommitdiff
path: root/src/render/llr_impl.h
diff options
context:
space:
mode:
author3gg <3gg@shellblade.net>2025-11-02 18:18:56 -0800
committer3gg <3gg@shellblade.net>2025-11-02 18:18:56 -0800
commit0dc3a9df980630b671bbc5df69503c2e72dcf004 (patch)
tree1b46c45ecf8842f8aa3d24c542f28719452f8a46 /src/render/llr_impl.h
parent3e559ab467857e49941d08b91873ceaa6d1f9d8d (diff)
Consolidate scene data structures
Diffstat (limited to 'src/render/llr_impl.h')
-rw-r--r--src/render/llr_impl.h31
1 files changed, 0 insertions, 31 deletions
diff --git a/src/render/llr_impl.h b/src/render/llr_impl.h
index 3a5455a..9d70843 100644
--- a/src/render/llr_impl.h
+++ b/src/render/llr_impl.h
@@ -10,43 +10,12 @@
10#include <stddef.h> 10#include <stddef.h>
11#include <stdint.h> 11#include <stdint.h>
12 12
13typedef struct Geometry Geometry;
14typedef struct GfxCore GfxCore; 13typedef struct GfxCore GfxCore;
15typedef struct IBL IBL; 14typedef struct IBL IBL;
16typedef struct Material Material; 15typedef struct Material Material;
17typedef struct ShaderProgram ShaderProgram; 16typedef struct ShaderProgram ShaderProgram;
18typedef struct Texture Texture; 17typedef struct Texture Texture;
19 18
20/// An environment light.
21typedef struct EnvironmentLight {
22 const Texture* environment_map;
23 const Texture* irradiance_map; // Renderer implementation.
24 const Texture* prefiltered_environment_map; // Renderer implementation.
25 int max_reflection_lod; // Mandatory when prefiltered_environment_map is
26 // given.
27} EnvironmentLight;
28
29/// A scene light.
30typedef struct Light {
31 LightType type;
32 union {
33 EnvironmentLight environment;
34 };
35} Light;
36
37typedef struct Material {
38 AlphaMode alpha_mode;
39 float alpha_cutoff;
40 int8_t num_uniforms;
41 ShaderUniform uniforms[GFX_MAX_UNIFORMS_PER_MATERIAL];
42} Material;
43
44typedef struct Mesh {
45 const Geometry* geometry;
46 const Material* material;
47 ShaderProgram* shader; // TODO: Move this back to Material?
48} Mesh;
49
50/// Immediate mode renderer. 19/// Immediate mode renderer.
51/// 20///
52/// The renderer caches state changes in memory and only programs the underlying 21/// The renderer caches state changes in memory and only programs the underlying