3dphotoshoot
diff src/sanegl.c @ 26:a460b1e5af4a
added GLUT frontend
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Thu, 18 Jun 2015 03:55:05 +0300 |
parents | ad49e1f9b627 |
children |
line diff
1.1 --- a/src/sanegl.c Thu Jun 18 03:12:30 2015 +0300 1.2 +++ b/src/sanegl.c Thu Jun 18 03:55:05 2015 +0300 1.3 @@ -286,7 +286,7 @@ 1.4 double ndcy = 2.0 * (winy - viewp[1]) / viewp[3] - 1.0; 1.5 double ndcz = 2.0 * winz - 1.0; 1.6 1.7 - // calculate modelviewprojection 1.8 + /* calculate modelviewprojection */ 1.9 gl_matrix_mode(GL_MODELVIEW); 1.10 gl_push_matrix(); 1.11 gl_load_matrixd(proj); 1.12 @@ -294,10 +294,10 @@ 1.13 gl_get_doublev(GL_MODELVIEW_MATRIX, mvp); 1.14 gl_pop_matrix(); 1.15 1.16 - // invert modelviewprojection 1.17 + /* invert modelviewprojection */ 1.18 m4_inverse(inv_mvp, mvp); 1.19 1.20 - // transform ndc by modelview -> obj 1.21 + /* transform ndc by modelview -> obj */ 1.22 /**objx = inv_mvp[0] * ndcx + inv_mvp[4] * ndcy + inv_mvp[8] * ndcz + inv_mvp[12]; 1.23 *objy = inv_mvp[1] * ndcx + inv_mvp[5] * ndcy + inv_mvp[9] * ndcz + inv_mvp[13]; 1.24 *objz = inv_mvp[2] * ndcx + inv_mvp[6] * ndcy + inv_mvp[10] * ndcz + inv_mvp[14];*/