diff --git a/src/credits.c b/src/credits.c index 20aef31..7e44251 100644 --- a/src/credits.c +++ b/src/credits.c @@ -4,6 +4,9 @@ static GLuint _pId = 0; static GLuint _texId = 0; static GLuint _quadId = 0; +static const char matrix_modview[] = "modview"; +static const char matrix_proj[] = "proj"; + static void init(void); static void draw(void); @@ -25,8 +28,8 @@ void credits(int state) { static void init(void) { _pId = gl4duCreateProgram("shaders/credits.vs", "shaders/credits.fs", NULL); - gl4duGenMatrix(GL_FLOAT, "modview"); - gl4duGenMatrix(GL_FLOAT, "proj"); + gl4duGenMatrix(GL_FLOAT, matrix_modview); + gl4duGenMatrix(GL_FLOAT, matrix_proj); _quadId = gl4dgGenQuadf(); // Code utilisé en tant qu'erreur de TTF_Font @@ -66,11 +69,11 @@ static void draw(void) { d = -1.1f + .25f * t; GLfloat ratio = (GLfloat)_dims[0] / (GLfloat)_dims[1]; - gl4duBindMatrix("proj"); + gl4duBindMatrix(matrix_proj); gl4duLoadIdentityf(); gl4duFrustumf(-ratio, ratio, -1, 1, 2, 100); - gl4duBindMatrix("modview"); + gl4duBindMatrix(matrix_modview); gl4duLoadIdentityf(); gl4duTranslatef(0.f, d, -2.f);