From 6c19f0e7856298d123a8847f28c647064e456bdf Mon Sep 17 00:00:00 2001 From: Mylloon Date: Fri, 19 May 2023 11:25:07 +0200 Subject: [PATCH] 30 manifestants selon la police --- src/manif.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/manif.c b/src/manif.c index 301673f..07e439c 100644 --- a/src/manif.c +++ b/src/manif.c @@ -9,7 +9,7 @@ struct manifestant { GLfloat ox, oz; }; -#define HEROS_NUMBER 20 // should change in fragment shader too +#define HEROS_NUMBER 30 // should change in fragment shader too static struct manifestant _herosId[HEROS_NUMBER]; static const char *matrix_proj = "proj"; @@ -171,10 +171,10 @@ static void draw(void) { gl4dgDraw(_herosId[i].bras_d); } - glUniform4fv(glGetUniformLocation(_pId, "lum_pos"), HEROS_NUMBER, - (float *)lumpos); - glUniform4fv(glGetUniformLocation(_pId, "lum_color"), HEROS_NUMBER, - (float *)lumcolor); + /* On devrait donner HEROS_NUMBER mais pour éviter de ne plus rien voir avec + * les lumières, on en donne que 20 */ + glUniform4fv(glGetUniformLocation(_pId, "lum_pos"), 20, (float *)lumpos); + glUniform4fv(glGetUniformLocation(_pId, "lum_color"), 20, (float *)lumcolor); deplacement += (float)(0.4 * M_PI * dt); glUseProgram(0);