libanim

diff example/test.c @ 47:0be4f220ebdc

fixed an uninitialized mutex
author John Tsiombikas <nuclear@member.fsf.org>
date Sun, 10 Mar 2013 18:52:27 +0200
parents 2fe32e62e2a7
children 3c2428cb38f7
line diff
     1.1 --- a/example/test.c	Fri Mar 08 04:54:05 2013 +0200
     1.2 +++ b/example/test.c	Sun Mar 10 18:52:27 2013 +0200
     1.3 @@ -55,7 +55,7 @@
     1.4  void mouse(int bn, int state, int x, int y);
     1.5  void motion(int x, int y);
     1.6  
     1.7 -float cam_theta = 20, cam_phi = 20, cam_dist = 15;
     1.8 +float cam_theta = 200, cam_phi = 20, cam_dist = 15;
     1.9  struct anm_node *root;
    1.10  
    1.11  struct anm_node *nodes[NUM_NODES];
    1.12 @@ -186,7 +186,7 @@
    1.13  
    1.14  	for(i=0; i<NUM_NODES; i++) {
    1.15  		float color[4] = {0, 0, 0, 1};
    1.16 -		mat4_t xform;
    1.17 +		mat4_t xform, xform_transp;
    1.18  
    1.19  		color[0] = parts[i].color.x;
    1.20  		color[1] = parts[i].color.y;
    1.21 @@ -196,9 +196,10 @@
    1.22  		glColor4fv(color);
    1.23  
    1.24  		anm_get_matrix(nodes[i], xform, msec);
    1.25 +		m4_transpose(xform_transp, xform);
    1.26  
    1.27  		glPushMatrix();
    1.28 -		glMultTransposeMatrixf((float*)xform);
    1.29 +		glMultMatrixf((float*)xform_transp);
    1.30  
    1.31  		glScalef(parts[i].sz.x, parts[i].sz.y, parts[i].sz.z);
    1.32  		glutSolidCube(1.0);