diff options
Diffstat (limited to 'src/render/llr_impl.h')
| -rw-r--r-- | src/render/llr_impl.h | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/src/render/llr_impl.h b/src/render/llr_impl.h index c85ad15..9d70843 100644 --- a/src/render/llr_impl.h +++ b/src/render/llr_impl.h | |||
| @@ -3,8 +3,6 @@ | |||
| 3 | #include <gfx/render/llr.h> | 3 | #include <gfx/render/llr.h> |
| 4 | #include <gfx/sizes.h> | 4 | #include <gfx/sizes.h> |
| 5 | 5 | ||
| 6 | #include "../types.h" | ||
| 7 | |||
| 8 | #include <math/mat4.h> | 6 | #include <math/mat4.h> |
| 9 | #include <math/vec3.h> | 7 | #include <math/vec3.h> |
| 10 | 8 | ||
| @@ -12,41 +10,12 @@ | |||
| 12 | #include <stddef.h> | 10 | #include <stddef.h> |
| 13 | #include <stdint.h> | 11 | #include <stdint.h> |
| 14 | 12 | ||
| 15 | typedef struct Geometry Geometry; | ||
| 16 | typedef struct GfxCore GfxCore; | 13 | typedef struct GfxCore GfxCore; |
| 17 | typedef struct IBL IBL; | 14 | typedef struct IBL IBL; |
| 18 | typedef struct Material Material; | 15 | typedef struct Material Material; |
| 19 | typedef struct ShaderProgram ShaderProgram; | 16 | typedef struct ShaderProgram ShaderProgram; |
| 20 | typedef struct Texture Texture; | 17 | typedef struct Texture Texture; |
| 21 | 18 | ||
| 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 | } Light; | ||
| 38 | |||
| 39 | typedef struct Material { | ||
| 40 | ShaderUniform uniforms[GFX_MAX_UNIFORMS_PER_MATERIAL]; | ||
| 41 | int num_uniforms; | ||
| 42 | } Material; | ||
| 43 | |||
| 44 | typedef 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 |
