30 manifestants selon la police

This commit is contained in:
Mylloon 2023-05-19 11:25:07 +02:00
parent fbcb4dd4c3
commit 6c19f0e785
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

View file

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