goat3d

diff goatview/src/goatview.cc @ 80:c5e997e8fd62

lalala
author John Tsiombikas <nuclear@member.fsf.org>
date Thu, 08 May 2014 23:00:30 +0300
parents a42f6cd4e2fa
children 70b7c41a4f17
line diff
     1.1 --- a/goatview/src/goatview.cc	Thu May 08 19:30:49 2014 +0300
     1.2 +++ b/goatview/src/goatview.cc	Thu May 08 23:00:30 2014 +0300
     1.3 @@ -183,9 +183,9 @@
     1.4  		int node_count = goat3d_get_node_count(scene);
     1.5  		for(int i=0; i<node_count; i++) {
     1.6  			goat3d_node *node = goat3d_get_node(scene, i);
     1.7 -			if(!goat3d_get_node_parent(node)) {
     1.8 +			//if(!goat3d_get_node_parent(node)) {
     1.9  				draw_node(node);	// only draw root nodes, the rest will be drawn recursively
    1.10 -			}
    1.11 +			//}
    1.12  		}
    1.13  	}
    1.14  }
    1.15 @@ -203,7 +203,7 @@
    1.16  	}
    1.17  
    1.18  	glPushMatrix();
    1.19 -	glLoadMatrixf(xform);
    1.20 +	glMultMatrixf(xform);
    1.21  
    1.22  	if(goat3d_get_node_type(node) == GOAT3D_NODE_MESH) {
    1.23  		goat3d_mesh *mesh = (goat3d_mesh*)goat3d_get_node_object(node);
    1.24 @@ -236,10 +236,10 @@
    1.25  		glDisableClientState(GL_TEXTURE_COORD_ARRAY);
    1.26  	}
    1.27  
    1.28 -	int num_child = goat3d_get_node_child_count(node);
    1.29 +	/*int num_child = goat3d_get_node_child_count(node);
    1.30  	for(int i=0; i<num_child; i++) {
    1.31  		draw_node(goat3d_get_node_child(node, i));
    1.32 -	}
    1.33 +	}*/
    1.34  
    1.35  	glPopMatrix();
    1.36  }
    1.37 @@ -256,6 +256,8 @@
    1.38  {
    1.39  	int dx = ev->x() - prev_x;
    1.40  	int dy = ev->y() - prev_y;
    1.41 +	prev_x = ev->x();
    1.42 +	prev_y = ev->y();
    1.43  
    1.44  	if(!dx && !dy) return;
    1.45