diff options
Diffstat (limited to 'src/llr/llr_impl.h')
| -rw-r--r-- | src/llr/llr_impl.h | 31 |
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; | |||
| 17 | typedef struct ShaderProgram ShaderProgram; | 19 | typedef struct ShaderProgram ShaderProgram; |
| 18 | typedef struct Texture Texture; | 20 | typedef struct Texture Texture; |
| 19 | 21 | ||
| 22 | /// An environment light. | ||
| 23 | typedef 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. | ||
| 32 | typedef struct Light { | ||
| 33 | LightType type; | ||
| 34 | union { | ||
| 35 | EnvironmentLight environment; | ||
| 36 | }; | ||
| 37 | node_idx parent; // Parent SceneNode. | ||
| 38 | } Light; | ||
| 39 | |||
| 40 | typedef struct Material { | ||
| 41 | ShaderUniform uniforms[GFX_MAX_UNIFORMS_PER_MATERIAL]; | ||
| 42 | int num_uniforms; | ||
| 43 | } Material; | ||
| 44 | |||
| 45 | typedef 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 |
