diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/shader_program.c | 29 | ||||
| -rw-r--r-- | src/memory.c | 4 | ||||
| -rw-r--r-- | src/render/llr.c | 119 | ||||
| -rw-r--r-- | src/render/llr_impl.h | 31 | ||||
| -rw-r--r-- | src/render/renderer.c | 3 | ||||
| -rw-r--r-- | src/scene/light.c | 39 | ||||
| -rw-r--r-- | src/scene/light_impl.h | 20 | ||||
| -rw-r--r-- | src/scene/material.c | 24 | ||||
| -rw-r--r-- | src/scene/material_impl.h | 13 | ||||
| -rw-r--r-- | src/scene/mesh.c | 26 | ||||
| -rw-r--r-- | src/scene/mesh_impl.h | 11 | ||||
| -rw-r--r-- | src/scene/object.c | 3 |
12 files changed, 177 insertions, 145 deletions
diff --git a/src/core/shader_program.c b/src/core/shader_program.c index eeb46f8..3840019 100644 --- a/src/core/shader_program.c +++ b/src/core/shader_program.c | |||
| @@ -209,6 +209,35 @@ static ShaderUniform* get_or_allocate_uniform( | |||
| 209 | // The functions below save the value of a uniform in the shader program. If the | 209 | // The functions below save the value of a uniform in the shader program. If the |
| 210 | // uniform does not even exist, then there is no need to store the value. | 210 | // uniform does not even exist, then there is no need to store the value. |
| 211 | 211 | ||
| 212 | void gfx_set_uniform(ShaderProgram* prog, const ShaderUniform* uniform) { | ||
| 213 | switch (uniform->type) { | ||
| 214 | case UniformInt: | ||
| 215 | gfx_set_int_uniform(prog, uniform->name.str, uniform->value.uniform_int); | ||
| 216 | break; | ||
| 217 | case UniformFloat: | ||
| 218 | gfx_set_float_uniform( | ||
| 219 | prog, uniform->name.str, uniform->value.uniform_float); | ||
| 220 | break; | ||
| 221 | case UniformMat4: | ||
| 222 | gfx_set_mat4_uniform(prog, uniform->name.str, &uniform->value.uniform_mat4); | ||
| 223 | break; | ||
| 224 | case UniformVec3: | ||
| 225 | gfx_set_vec3_uniform(prog, uniform->name.str, uniform->value.uniform_vec3); | ||
| 226 | break; | ||
| 227 | case UniformVec4: | ||
| 228 | gfx_set_vec4_uniform(prog, uniform->name.str, uniform->value.uniform_vec4); | ||
| 229 | break; | ||
| 230 | case UniformTexture: | ||
| 231 | gfx_set_texture_uniform(prog, uniform->name.str, uniform->value.texture); | ||
| 232 | break; | ||
| 233 | case UniformMat4Array: | ||
| 234 | gfx_set_mat4_array_uniform( | ||
| 235 | prog, uniform->name.str, uniform->value.array.values, | ||
| 236 | uniform->value.array.count); | ||
| 237 | break; | ||
| 238 | } | ||
| 239 | } | ||
| 240 | |||
| 212 | void gfx_set_int_uniform(ShaderProgram* prog, const char* name, int value) { | 241 | void gfx_set_int_uniform(ShaderProgram* prog, const char* name, int value) { |
| 213 | assert(prog); | 242 | assert(prog); |
| 214 | assert(name); | 243 | assert(name); |
diff --git a/src/memory.c b/src/memory.c index de20f78..754f04d 100644 --- a/src/memory.c +++ b/src/memory.c | |||
| @@ -4,7 +4,9 @@ | |||
| 4 | #include <gfx/sizes.h> | 4 | #include <gfx/sizes.h> |
| 5 | 5 | ||
| 6 | #include "animation_impl.h" | 6 | #include "animation_impl.h" |
| 7 | #include "render/llr_impl.h" | 7 | #include "scene/light_impl.h" |
| 8 | #include "scene/material_impl.h" | ||
| 9 | #include "scene/mesh_impl.h" | ||
| 8 | #include "scene/model_impl.h" | 10 | #include "scene/model_impl.h" |
| 9 | #include "scene/node_impl.h" | 11 | #include "scene/node_impl.h" |
| 10 | #include "scene/object_impl.h" | 12 | #include "scene/object_impl.h" |
diff --git a/src/render/llr.c b/src/render/llr.c index c9c6d34..752b65b 100644 --- a/src/render/llr.c +++ b/src/render/llr.c | |||
| @@ -1,14 +1,15 @@ | |||
| 1 | #include "llr_impl.h" | 1 | #include "llr_impl.h" |
| 2 | 2 | ||
| 3 | #include "animation_impl.h" | 3 | #include "animation_impl.h" |
| 4 | #include "memory.h" | 4 | #include "scene/light_impl.h" |
| 5 | #include "scene/material_impl.h" | ||
| 6 | #include "scene/mesh_impl.h" | ||
| 5 | #include "scene/node_impl.h" | 7 | #include "scene/node_impl.h" |
| 6 | 8 | ||
| 7 | #include <gfx/core.h> | 9 | #include <gfx/core.h> |
| 8 | #include <gfx/util/ibl.h> | 10 | #include <gfx/util/ibl.h> |
| 9 | 11 | ||
| 10 | #include <cassert.h> | 12 | #include <cassert.h> |
| 11 | #include <error.h> | ||
| 12 | 13 | ||
| 13 | static const int IRRADIANCE_MAP_WIDTH = 1024; | 14 | static const int IRRADIANCE_MAP_WIDTH = 1024; |
| 14 | static const int IRRADIANCE_MAP_HEIGHT = 1024; | 15 | static const int IRRADIANCE_MAP_HEIGHT = 1024; |
| @@ -17,108 +18,23 @@ static const int PREFILTERED_ENVIRONMENT_MAP_HEIGHT = 128; | |||
| 17 | static const int BRDF_INTEGRATION_MAP_WIDTH = 512; | 18 | static const int BRDF_INTEGRATION_MAP_WIDTH = 512; |
| 18 | static const int BRDF_INTEGRATION_MAP_HEIGHT = 512; | 19 | static const int BRDF_INTEGRATION_MAP_HEIGHT = 512; |
| 19 | 20 | ||
| 20 | static void make_environment_light( | ||
| 21 | Light* light, const EnvironmentLightDesc* desc) { | ||
| 22 | assert(light); | ||
| 23 | assert(desc); | ||
| 24 | light->type = EnvironmentLightType; | ||
| 25 | light->environment.environment_map = desc->environment_map; | ||
| 26 | } | ||
| 27 | |||
| 28 | Light* gfx_make_light(const LightDesc* desc) { | ||
| 29 | assert(desc); | ||
| 30 | |||
| 31 | Light* light = mem_alloc_light(); | ||
| 32 | |||
| 33 | switch (desc->type) { | ||
| 34 | case EnvironmentLightType: | ||
| 35 | make_environment_light(light, &desc->light.environment); | ||
| 36 | break; | ||
| 37 | default: | ||
| 38 | log_error("Unhandled light type"); | ||
| 39 | gfx_destroy_light(&light); | ||
| 40 | return 0; | ||
| 41 | } | ||
| 42 | |||
| 43 | return light; | ||
| 44 | } | ||
| 45 | |||
| 46 | void gfx_destroy_light(Light** light) { | ||
| 47 | assert(light); | ||
| 48 | if (*light) { | ||
| 49 | mem_free_light(light); | ||
| 50 | } | ||
| 51 | } | ||
| 52 | |||
| 53 | static void material_make(Material* material, const MaterialDesc* desc) { | ||
| 54 | assert(material); | ||
| 55 | assert(desc); | ||
| 56 | assert(desc->num_uniforms < GFX_MAX_UNIFORMS_PER_MATERIAL); | ||
| 57 | material->alpha_mode = desc->alpha_mode; | ||
| 58 | material->alpha_cutoff = desc->alpha_cutoff; | ||
| 59 | material->num_uniforms = (int8_t)desc->num_uniforms; | ||
| 60 | for (int i = 0; i < desc->num_uniforms; ++i) { | ||
| 61 | material->uniforms[i] = desc->uniforms[i]; | ||
| 62 | } | ||
| 63 | } | ||
| 64 | |||
| 65 | Material* gfx_make_material(const MaterialDesc* desc) { | ||
| 66 | assert(desc); | ||
| 67 | Material* material = mem_alloc_material(); | ||
| 68 | material_make(material, desc); | ||
| 69 | return material; | ||
| 70 | } | ||
| 71 | |||
| 72 | void gfx_destroy_material(Material** material) { mem_free_material(material); } | ||
| 73 | |||
| 74 | // TODO: Move this to core/shader_program. | ||
| 75 | static void set_uniform(ShaderProgram* prog, const ShaderUniform* uniform) { | ||
| 76 | switch (uniform->type) { | ||
| 77 | case UniformInt: | ||
| 78 | gfx_set_int_uniform(prog, uniform->name.str, uniform->value.uniform_int); | ||
| 79 | break; | ||
| 80 | case UniformFloat: | ||
| 81 | gfx_set_float_uniform( | ||
| 82 | prog, uniform->name.str, uniform->value.uniform_float); | ||
| 83 | break; | ||
| 84 | case UniformMat4: | ||
| 85 | gfx_set_mat4_uniform(prog, uniform->name.str, &uniform->value.uniform_mat4); | ||
| 86 | break; | ||
| 87 | case UniformVec3: | ||
| 88 | gfx_set_vec3_uniform(prog, uniform->name.str, uniform->value.uniform_vec3); | ||
| 89 | break; | ||
| 90 | case UniformVec4: | ||
| 91 | gfx_set_vec4_uniform(prog, uniform->name.str, uniform->value.uniform_vec4); | ||
| 92 | break; | ||
| 93 | case UniformTexture: | ||
| 94 | gfx_set_texture_uniform(prog, uniform->name.str, uniform->value.texture); | ||
| 95 | break; | ||
| 96 | case UniformMat4Array: | ||
| 97 | gfx_set_mat4_array_uniform( | ||
| 98 | prog, uniform->name.str, uniform->value.array.values, | ||
| 99 | uniform->value.array.count); | ||
| 100 | break; | ||
| 101 | } | ||
| 102 | } | ||
| 103 | |||
| 104 | /// Activate the material. | 21 | /// Activate the material. |
| 105 | /// | 22 | /// |
| 106 | /// This configures the shader uniforms that are specific to the material. | 23 | /// This configures the shader uniforms that are specific to the material. |
| 107 | static void gfx_material_activate( | 24 | static void material_activate(ShaderProgram* shader, const Material* material) { |
| 108 | ShaderProgram* shader, const Material* material) { | ||
| 109 | assert(material); | 25 | assert(material); |
| 110 | for (int i = 0; i < material->num_uniforms; ++i) { | 26 | for (int i = 0; i < material->num_uniforms; ++i) { |
| 111 | const ShaderUniform* uniform = &material->uniforms[i]; | 27 | const ShaderUniform* uniform = &material->uniforms[i]; |
| 112 | set_uniform(shader, uniform); | 28 | gfx_set_uniform(shader, uniform); |
| 113 | } | 29 | } |
| 114 | if (material->alpha_mode != Opaque) { | 30 | if (material->alpha_mode != Opaque) { |
| 115 | set_uniform( | 31 | gfx_set_uniform( |
| 116 | shader, &(ShaderUniform){.name = sstring_make("AlphaMode"), | 32 | shader, &(ShaderUniform){.name = sstring_make("AlphaMode"), |
| 117 | .type = UniformInt, | 33 | .type = UniformInt, |
| 118 | .value.uniform_int = material->alpha_mode}); | 34 | .value.uniform_int = material->alpha_mode}); |
| 119 | } | 35 | } |
| 120 | if (material->alpha_mode == Mask) { | 36 | if (material->alpha_mode == Mask) { |
| 121 | set_uniform( | 37 | gfx_set_uniform( |
| 122 | shader, | 38 | shader, |
| 123 | &(ShaderUniform){.name = sstring_make("AlphaCutoff"), | 39 | &(ShaderUniform){.name = sstring_make("AlphaCutoff"), |
| 124 | .type = UniformFloat, | 40 | .type = UniformFloat, |
| @@ -126,25 +42,6 @@ static void gfx_material_activate( | |||
| 126 | } | 42 | } |
| 127 | } | 43 | } |
| 128 | 44 | ||
| 129 | static void mesh_make(Mesh* mesh, const MeshDesc* desc) { | ||
| 130 | assert(mesh); | ||
| 131 | assert(desc); | ||
| 132 | assert(desc->geometry); | ||
| 133 | assert(desc->material); | ||
| 134 | assert(desc->shader); | ||
| 135 | mesh->geometry = desc->geometry; | ||
| 136 | mesh->material = desc->material; | ||
| 137 | mesh->shader = desc->shader; | ||
| 138 | } | ||
| 139 | |||
| 140 | Mesh* gfx_make_mesh(const MeshDesc* desc) { | ||
| 141 | Mesh* mesh = mem_alloc_mesh(); | ||
| 142 | mesh_make(mesh, desc); | ||
| 143 | return mesh; | ||
| 144 | } | ||
| 145 | |||
| 146 | void gfx_destroy_mesh(Mesh** mesh) { mem_free_mesh(mesh); } | ||
| 147 | |||
| 148 | /// Initialize renderer state for IBL. | 45 | /// Initialize renderer state for IBL. |
| 149 | static bool init_ibl(LLR* renderer) { | 46 | static bool init_ibl(LLR* renderer) { |
| 150 | assert(renderer); | 47 | assert(renderer); |
| @@ -334,7 +231,7 @@ static void configure_state(LLR* renderer) { | |||
| 334 | 231 | ||
| 335 | // Geometry may be rendered without a material. | 232 | // Geometry may be rendered without a material. |
| 336 | if (renderer->material) { | 233 | if (renderer->material) { |
| 337 | gfx_material_activate(renderer->shader, renderer->material); | 234 | material_activate(renderer->shader, renderer->material); |
| 338 | } | 235 | } |
| 339 | } | 236 | } |
| 340 | 237 | ||
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 | ||
| 13 | typedef struct Geometry Geometry; | ||
| 14 | typedef struct GfxCore GfxCore; | 13 | typedef struct GfxCore GfxCore; |
| 15 | typedef struct IBL IBL; | 14 | typedef struct IBL IBL; |
| 16 | typedef struct Material Material; | 15 | typedef struct Material Material; |
| 17 | typedef struct ShaderProgram ShaderProgram; | 16 | typedef struct ShaderProgram ShaderProgram; |
| 18 | typedef struct Texture Texture; | 17 | typedef struct Texture Texture; |
| 19 | 18 | ||
| 20 | /// An environment light. | ||
| 21 | typedef 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. | ||
| 30 | typedef struct Light { | ||
| 31 | LightType type; | ||
| 32 | union { | ||
| 33 | EnvironmentLight environment; | ||
| 34 | }; | ||
| 35 | } Light; | ||
| 36 | |||
| 37 | typedef 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 | |||
| 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 |
diff --git a/src/render/renderer.c b/src/render/renderer.c index 6962d6b..a9d9bef 100644 --- a/src/render/renderer.c +++ b/src/render/renderer.c | |||
| @@ -3,10 +3,11 @@ | |||
| 3 | #include "animation_impl.h" | 3 | #include "animation_impl.h" |
| 4 | #include "llr_impl.h" | 4 | #include "llr_impl.h" |
| 5 | #include "memory.h" | 5 | #include "memory.h" |
| 6 | #include "scene/material_impl.h" | ||
| 7 | #include "scene/mesh_impl.h" | ||
| 6 | #include "scene/model_impl.h" | 8 | #include "scene/model_impl.h" |
| 7 | #include "scene/node_impl.h" | 9 | #include "scene/node_impl.h" |
| 8 | #include "scene/object_impl.h" | 10 | #include "scene/object_impl.h" |
| 9 | #include "scene/scene_impl.h" | ||
| 10 | 11 | ||
| 11 | #include <gfx/core.h> | 12 | #include <gfx/core.h> |
| 12 | #include <gfx/render/llr.h> | 13 | #include <gfx/render/llr.h> |
diff --git a/src/scene/light.c b/src/scene/light.c new file mode 100644 index 0000000..4233330 --- /dev/null +++ b/src/scene/light.c | |||
| @@ -0,0 +1,39 @@ | |||
| 1 | #include "light_impl.h" | ||
| 2 | |||
| 3 | #include "memory.h" | ||
| 4 | |||
| 5 | #include <cassert.h> | ||
| 6 | #include <error.h> | ||
| 7 | |||
| 8 | static void make_environment_light( | ||
| 9 | Light* light, const EnvironmentLightDesc* desc) { | ||
| 10 | assert(light); | ||
| 11 | assert(desc); | ||
| 12 | light->type = EnvironmentLightType; | ||
| 13 | light->environment.environment_map = desc->environment_map; | ||
| 14 | } | ||
| 15 | |||
| 16 | Light* gfx_make_light(const LightDesc* desc) { | ||
| 17 | assert(desc); | ||
| 18 | |||
| 19 | Light* light = mem_alloc_light(); | ||
| 20 | |||
| 21 | switch (desc->type) { | ||
| 22 | case EnvironmentLightType: | ||
| 23 | make_environment_light(light, &desc->light.environment); | ||
| 24 | break; | ||
| 25 | default: | ||
| 26 | log_error("Unhandled light type"); | ||
| 27 | gfx_destroy_light(&light); | ||
| 28 | return 0; | ||
| 29 | } | ||
| 30 | |||
| 31 | return light; | ||
| 32 | } | ||
| 33 | |||
| 34 | void gfx_destroy_light(Light** light) { | ||
| 35 | assert(light); | ||
| 36 | if (*light) { | ||
| 37 | mem_free_light(light); | ||
| 38 | } | ||
| 39 | } | ||
diff --git a/src/scene/light_impl.h b/src/scene/light_impl.h new file mode 100644 index 0000000..3191a50 --- /dev/null +++ b/src/scene/light_impl.h | |||
| @@ -0,0 +1,20 @@ | |||
| 1 | #pragma once | ||
| 2 | |||
| 3 | #include <gfx/scene.h> | ||
| 4 | |||
| 5 | /// An environment light. | ||
| 6 | typedef struct EnvironmentLight { | ||
| 7 | const Texture* environment_map; | ||
| 8 | const Texture* irradiance_map; // Renderer implementation. | ||
| 9 | const Texture* prefiltered_environment_map; // Renderer implementation. | ||
| 10 | int max_reflection_lod; // Mandatory when prefiltered_environment_map is | ||
| 11 | // given. | ||
| 12 | } EnvironmentLight; | ||
| 13 | |||
| 14 | /// A scene light. | ||
| 15 | typedef struct Light { | ||
| 16 | LightType type; | ||
| 17 | union { | ||
| 18 | EnvironmentLight environment; | ||
| 19 | }; | ||
| 20 | } Light; | ||
diff --git a/src/scene/material.c b/src/scene/material.c new file mode 100644 index 0000000..9fe6c1b --- /dev/null +++ b/src/scene/material.c | |||
| @@ -0,0 +1,24 @@ | |||
| 1 | #include "material_impl.h" | ||
| 2 | |||
| 3 | #include "memory.h" | ||
| 4 | |||
| 5 | static void material_make(Material* material, const MaterialDesc* desc) { | ||
| 6 | assert(material); | ||
| 7 | assert(desc); | ||
| 8 | assert(desc->num_uniforms < GFX_MAX_UNIFORMS_PER_MATERIAL); | ||
| 9 | material->alpha_mode = desc->alpha_mode; | ||
| 10 | material->alpha_cutoff = desc->alpha_cutoff; | ||
| 11 | material->num_uniforms = (int8_t)desc->num_uniforms; | ||
| 12 | for (int i = 0; i < desc->num_uniforms; ++i) { | ||
| 13 | material->uniforms[i] = desc->uniforms[i]; | ||
| 14 | } | ||
| 15 | } | ||
| 16 | |||
| 17 | Material* gfx_make_material(const MaterialDesc* desc) { | ||
| 18 | assert(desc); | ||
| 19 | Material* material = mem_alloc_material(); | ||
| 20 | material_make(material, desc); | ||
| 21 | return material; | ||
| 22 | } | ||
| 23 | |||
| 24 | void gfx_destroy_material(Material** material) { mem_free_material(material); } | ||
diff --git a/src/scene/material_impl.h b/src/scene/material_impl.h new file mode 100644 index 0000000..488ffc7 --- /dev/null +++ b/src/scene/material_impl.h | |||
| @@ -0,0 +1,13 @@ | |||
| 1 | #pragma once | ||
| 2 | |||
| 3 | #include <gfx/scene.h> | ||
| 4 | #include <gfx/sizes.h> | ||
| 5 | |||
| 6 | typedef struct ShaderProgram ShaderProgram; | ||
| 7 | |||
| 8 | typedef struct Material { | ||
| 9 | AlphaMode alpha_mode; | ||
| 10 | float alpha_cutoff; | ||
| 11 | int8_t num_uniforms; | ||
| 12 | ShaderUniform uniforms[GFX_MAX_UNIFORMS_PER_MATERIAL]; | ||
| 13 | } Material; | ||
diff --git a/src/scene/mesh.c b/src/scene/mesh.c new file mode 100644 index 0000000..770c3fb --- /dev/null +++ b/src/scene/mesh.c | |||
| @@ -0,0 +1,26 @@ | |||
| 1 | #include "mesh_impl.h" | ||
| 2 | |||
| 3 | #include <gfx/scene.h> | ||
| 4 | |||
| 5 | #include "memory.h" | ||
| 6 | |||
| 7 | #include <cassert.h> | ||
| 8 | |||
| 9 | static void mesh_make(Mesh* mesh, const MeshDesc* desc) { | ||
| 10 | assert(mesh); | ||
| 11 | assert(desc); | ||
| 12 | assert(desc->geometry); | ||
| 13 | assert(desc->material); | ||
| 14 | assert(desc->shader); | ||
| 15 | mesh->geometry = desc->geometry; | ||
| 16 | mesh->material = desc->material; | ||
| 17 | mesh->shader = desc->shader; | ||
| 18 | } | ||
| 19 | |||
| 20 | Mesh* gfx_make_mesh(const MeshDesc* desc) { | ||
| 21 | Mesh* mesh = mem_alloc_mesh(); | ||
| 22 | mesh_make(mesh, desc); | ||
| 23 | return mesh; | ||
| 24 | } | ||
| 25 | |||
| 26 | void gfx_destroy_mesh(Mesh** mesh) { mem_free_mesh(mesh); } | ||
diff --git a/src/scene/mesh_impl.h b/src/scene/mesh_impl.h new file mode 100644 index 0000000..c7e2211 --- /dev/null +++ b/src/scene/mesh_impl.h | |||
| @@ -0,0 +1,11 @@ | |||
| 1 | #pragma once | ||
| 2 | |||
| 3 | typedef struct Geometry Geometry; | ||
| 4 | typedef struct Material Material; | ||
| 5 | typedef struct ShaderProgram ShaderProgram; | ||
| 6 | |||
| 7 | typedef struct Mesh { | ||
| 8 | const Geometry* geometry; | ||
| 9 | const Material* material; | ||
| 10 | ShaderProgram* shader; // TODO: Move this back to Material? | ||
| 11 | } Mesh; | ||
diff --git a/src/scene/object.c b/src/scene/object.c index 7004ce1..ac86b39 100644 --- a/src/scene/object.c +++ b/src/scene/object.c | |||
| @@ -3,8 +3,9 @@ | |||
| 3 | #include <gfx/core.h> | 3 | #include <gfx/core.h> |
| 4 | 4 | ||
| 5 | #include "memory.h" | 5 | #include "memory.h" |
| 6 | #include "node_impl.h" | ||
| 7 | #include "render/llr_impl.h" | 6 | #include "render/llr_impl.h" |
| 7 | #include "scene/mesh_impl.h" | ||
| 8 | #include "scene/node_impl.h" | ||
| 8 | 9 | ||
| 9 | #include <assert.h> | 10 | #include <assert.h> |
| 10 | 11 | ||
