summaryrefslogtreecommitdiff
path: root/src/new_render/shadows.c
diff options
context:
space:
mode:
authoromniscient <17525998+omnisci3nce@users.noreply.github.com>2024-07-27 14:01:16 +1000
committeromniscient <17525998+omnisci3nce@users.noreply.github.com>2024-07-27 14:01:16 +1000
commitaa0fe8457cfff9c47c0c9fa4a1c86a79c7cbf9c5 (patch)
treea7fa374cb59c6c59e386086dcdae8a7efc372b5f /src/new_render/shadows.c
parent2e2c57a8c04575eec164279a49947cfdba250853 (diff)
add a pool insert function. move RenderEnt to use handles
Diffstat (limited to 'src/new_render/shadows.c')
-rw-r--r--src/new_render/shadows.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/new_render/shadows.c b/src/new_render/shadows.c
index 6a9fe02..92fce81 100644
--- a/src/new_render/shadows.c
+++ b/src/new_render/shadows.c
@@ -1,9 +1,9 @@
#include "shadows.h"
#include <string.h>
-#include "core.h"
#include "file.h"
#include "glad/glad.h"
#include "log.h"
+#include "maths.h"
#include "maths_types.h"
#include "primitives.h"
#include "ral_common.h"
@@ -197,12 +197,12 @@ void Shadow_ShadowmapExecute(Shadow_Storage* storage, Mat4 light_space_transform
for (size_t ent_i = 0; ent_i < entity_count; ent_i++) {
RenderEnt renderable = entities[ent_i];
- if (renderable.casts_shadows) {
+ if (renderable.flags && REND_ENT_CASTS_SHADOWS) {
// Model* model = MODEL_GET(renderable.model);
uniforms.model = renderable.affine; // update the model transform
- Mesh* mesh = renderable.mesh;
+ Mesh* mesh = Mesh_pool_get(Render_GetMeshPool(), renderable.mesh);
GPU_EncodeBindShaderData(&shadow_encoder, 0, shader_data);
GPU_EncodeSetVertexBuffer(&shadow_encoder, mesh->vertex_buffer);
GPU_EncodeSetIndexBuffer(&shadow_encoder, mesh->index_buffer);