add comments
This commit is contained in:
parent
4963b48398
commit
bd440e9f71
1 changed files with 5 additions and 0 deletions
5
window.c
5
window.c
|
@ -311,9 +311,11 @@ void draw(void) {
|
||||||
_cube->dcolor = couleurHerosA;
|
_cube->dcolor = couleurHerosA;
|
||||||
_sphere->dcolor = couleurHerosA;
|
_sphere->dcolor = couleurHerosA;
|
||||||
memcpy(nmv, model_view_matrix, sizeof(nmv));
|
memcpy(nmv, model_view_matrix, sizeof(nmv));
|
||||||
|
/* Corps */
|
||||||
translate(nmv, _herosA.x, _herosA.y, _herosA.z);
|
translate(nmv, _herosA.x, _herosA.y, _herosA.z);
|
||||||
scale(nmv, _cubeSize / 3.0f, _cubeSize / 3.0f, _cubeSize / 3.0f);
|
scale(nmv, _cubeSize / 3.0f, _cubeSize / 3.0f, _cubeSize / 3.0f);
|
||||||
transform_n_rasterize(_cube, nmv, projection_matrix);
|
transform_n_rasterize(_cube, nmv, projection_matrix);
|
||||||
|
/* Tête */
|
||||||
translate(nmv, 0.0f, 2.0f, 0.0f);
|
translate(nmv, 0.0f, 2.0f, 0.0f);
|
||||||
transform_n_rasterize(_sphere, nmv, projection_matrix);
|
transform_n_rasterize(_sphere, nmv, projection_matrix);
|
||||||
|
|
||||||
|
@ -321,9 +323,11 @@ void draw(void) {
|
||||||
_cube->dcolor = couleurHerosB;
|
_cube->dcolor = couleurHerosB;
|
||||||
_sphere->dcolor = couleurHerosB;
|
_sphere->dcolor = couleurHerosB;
|
||||||
memcpy(nmv, model_view_matrix, sizeof(nmv));
|
memcpy(nmv, model_view_matrix, sizeof(nmv));
|
||||||
|
/* Corps */
|
||||||
translate(nmv, _herosB.x, _herosB.y, _herosB.z);
|
translate(nmv, _herosB.x, _herosB.y, _herosB.z);
|
||||||
scale(nmv, _cubeSize / 3.0f, _cubeSize / 3.0f, _cubeSize / 3.0f);
|
scale(nmv, _cubeSize / 3.0f, _cubeSize / 3.0f, _cubeSize / 3.0f);
|
||||||
transform_n_rasterize(_cube, nmv, projection_matrix);
|
transform_n_rasterize(_cube, nmv, projection_matrix);
|
||||||
|
/* Tête */
|
||||||
translate(nmv, 0.0f, 2.0f, 0.0f);
|
translate(nmv, 0.0f, 2.0f, 0.0f);
|
||||||
transform_n_rasterize(_sphere, nmv, projection_matrix);
|
transform_n_rasterize(_sphere, nmv, projection_matrix);
|
||||||
|
|
||||||
|
@ -346,6 +350,7 @@ void keyd(int keycode) {
|
||||||
SDL_GL_SetSwapInterval(0);
|
SDL_GL_SetSwapInterval(0);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
/* 'h' afficher ou non les infos de debug */
|
||||||
case GL4DK_h:
|
case GL4DK_h:
|
||||||
_debug = !_debug;
|
_debug = !_debug;
|
||||||
break;
|
break;
|
||||||
|
|
Reference in a new issue