deepstone

changeset 13:7b574ba5758e

fixed the directional light
author John Tsiombikas <nuclear@member.fsf.org>
date Mon, 28 Nov 2011 05:12:33 +0200
parents c29a6e024950
children be61704c4cc8
files src/mingl.c src/test.c
diffstat 2 files changed, 1 insertions(+), 3 deletions(-) [+]
line diff
     1.1 --- a/src/mingl.c	Mon Nov 28 05:03:22 2011 +0200
     1.2 +++ b/src/mingl.c	Mon Nov 28 05:12:33 2011 +0200
     1.3 @@ -196,8 +196,6 @@
     1.4  	transform(&st.lpos[ltidx], &pos, st.matrix[MGL_MODELVIEW][st.mtop[MGL_MODELVIEW]]);
     1.5  
     1.6  	if(fabs(st.lpos[ltidx].w) < 1e-6) {
     1.7 -		st.lpos[ltidx].w = 1.0;
     1.8 -
     1.9  		NORMALIZE(st.lpos[ltidx]);
    1.10  	} else {
    1.11  		st.lpos[ltidx].x /= st.lpos[ltidx].w;
     2.1 --- a/src/test.c	Mon Nov 28 05:03:22 2011 +0200
     2.2 +++ b/src/test.c	Mon Nov 28 05:12:33 2011 +0200
     2.3 @@ -162,7 +162,7 @@
     2.4  
     2.5  	mgl_enable(MGL_LIGHTING);
     2.6  	mgl_light_intensity(0, 1.0);
     2.7 -	mgl_light_direction(0, -0.5, 0.5, 1);
     2.8 +	mgl_light_position(0, -0.5, 0.5, 1, 0);
     2.9  
    2.10  	mgl_matrix_mode(MGL_PROJECTION);
    2.11  	mgl_load_identity();