aboutsummaryrefslogtreecommitdiff
path: root/src/llr/llr_impl.h
diff options
context:
space:
mode:
author3gg <3gg@shellblade.net>2025-10-24 15:40:40 -0700
committer3gg <3gg@shellblade.net>2025-10-24 15:40:40 -0700
commit175c72557b21f356e295a6f8a4acd91b7e744bef (patch)
tree3d2a77481bc112e58a7618ef3b8de20a9e415811 /src/llr/llr_impl.h
parentc2cbe2ef1cb0237efd14fbe87469ee991ad3daa1 (diff)
Consolidate LLR into a single file.
Diffstat (limited to 'src/llr/llr_impl.h')
-rw-r--r--src/llr/llr_impl.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/llr/llr_impl.h b/src/llr/llr_impl.h
index 3f6a68f..6318ee0 100644
--- a/src/llr/llr_impl.h
+++ b/src/llr/llr_impl.h
@@ -3,6 +3,8 @@
3#include <gfx/llr/llr.h> 3#include <gfx/llr/llr.h>
4#include <gfx/sizes.h> 4#include <gfx/sizes.h>
5 5
6#include "scene/types.h"
7
6#include <math/mat4.h> 8#include <math/mat4.h>
7#include <math/vec3.h> 9#include <math/vec3.h>
8 10
@@ -17,6 +19,35 @@ typedef struct Material Material;
17typedef struct ShaderProgram ShaderProgram; 19typedef struct ShaderProgram ShaderProgram;
18typedef struct Texture Texture; 20typedef struct Texture Texture;
19 21
22/// An environment light.
23typedef struct EnvironmentLight {
24 const Texture* environment_map;
25 const Texture* irradiance_map; // Renderer implementation.
26 const Texture* prefiltered_environment_map; // Renderer implementation.
27 int max_reflection_lod; // Mandatory when prefiltered_environment_map is
28 // given.
29} EnvironmentLight;
30
31/// A scene light.
32typedef struct Light {
33 LightType type;
34 union {
35 EnvironmentLight environment;
36 };
37 node_idx parent; // Parent SceneNode.
38} Light;
39
40typedef struct Material {
41 ShaderUniform uniforms[GFX_MAX_UNIFORMS_PER_MATERIAL];
42 int num_uniforms;
43} Material;
44
45typedef struct Mesh {
46 const Geometry* geometry;
47 const Material* material;
48 ShaderProgram* shader; // TODO: Move this back to Material?
49} Mesh;
50
20/// Immediate mode renderer. 51/// Immediate mode renderer.
21/// 52///
22/// The renderer caches state changes in memory and only programs the underlying 53/// The renderer caches state changes in memory and only programs the underlying