From 9f055704fa9a29fd3ee624202fe4d4d9608b200a Mon Sep 17 00:00:00 2001 From: Mylloon Date: Sat, 27 May 2023 03:23:50 +0200 Subject: [PATCH] fbo pose pb ik --- src/animations.c | 2 ++ src/manif.c | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/animations.c b/src/animations.c index 04bd6d8..2c52dea 100644 --- a/src/animations.c +++ b/src/animations.c @@ -91,6 +91,8 @@ static void transition_draw(void (*a0)(int), void (*a1)(int), Uint32 t, _transition_tId, 0); glDisable(GL_DEPTH_TEST); + glDisable(GL_CULL_FACE); + glActiveTexture(GL_TEXTURE0); glBindTexture(GL_TEXTURE_2D, tex[0]); glActiveTexture(GL_TEXTURE1); diff --git a/src/manif.c b/src/manif.c index f6be269..2b2287e 100644 --- a/src/manif.c +++ b/src/manif.c @@ -91,16 +91,17 @@ static void draw(void) { bindAndLoadf(matrix_lview); gl4duLookAtf(9, 6, 0, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f); glCullFace(GL_FRONT); + glBindFramebuffer(GL_FRAMEBUFFER, _fbo); glFramebufferTexture2D(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_TEXTURE_2D, _shadow_map_tex, 0); glViewport(0, 0, SHADOW_MAP_SIDE, SHADOW_MAP_SIDE); glClear(GL_DEPTH_BUFFER_BIT); for (int i = 0; i < HEROS_NUMBER; ++i) { - drawManifestant(matrix_model, &_herosId[i], deplacement, GL_TRUE); } glBindFramebuffer(GL_FRAMEBUFFER, 0); + glCullFace(GL_BACK); glDrawBuffer(GL_COLOR_ATTACHMENT0);