fbo pose pb ik

This commit is contained in:
Mylloon 2023-05-27 03:23:50 +02:00
parent 52c5aa2d55
commit 9f055704fa
Signed by: Anri
GPG key ID: A82D63DFF8D1317F
2 changed files with 4 additions and 1 deletions

View file

@ -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);

View file

@ -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);