Subversion Repositories gelsvn

Rev

Rev 372 | Rev 396 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 372 Rev 373
Line 60... Line 60...
60
	{
60
	{
61
		int old_mat_idx = -1;
61
		int old_mat_idx = -1;
62
		glBegin(GL_TRIANGLES);
62
		glBegin(GL_TRIANGLES);
63
		for(int i=0;i<tm.geometry.no_faces();i++)
63
		for(int i=0;i<tm.geometry.no_faces();i++)
64
		{
64
		{
65
			int new_mat_idx = i<tm.mat_idx.size() ? tm.mat_idx[i] : -1;
65
			int new_mat_idx = i<static_cast<int>(tm.mat_idx.size()) ? tm.mat_idx[i] : -1;
66
			if(new_mat_idx != old_mat_idx)
66
			if(new_mat_idx != old_mat_idx)
67
			{
67
			{
68
				glEnd();
68
				glEnd();
69
				set_material(tm.materials[tm.mat_idx[i]]);
69
				set_material(tm.materials[tm.mat_idx[i]]);
70
				glBegin(GL_TRIANGLES);
70
				glBegin(GL_TRIANGLES);