Home | History | Annotate | Download | only in demos

Lines Matching defs:triangles

41 } triangles[MAX_TRIANGLES];
63 /* Allow multiple triangles to be output inside the begin/end pair. */
65 triangles[triangle_cnt].no = 0;
70 /* Persist the edge flag across triangles. */
91 glColor3f( triangles[i].color[0][0],
92 triangles[i].color[0][1],
93 triangles[i].color[0][2] );
95 glVertex2f( triangles[i].p[0][0], triangles[i].p[0][1] );
96 glVertex2f( triangles[i].p[1][0], triangles[i].p[1][1] );
98 glColor3f( triangles[i].color[1][0],
99 triangles[i].color[1][1],
100 triangles[i].color[1][2] );
102 glVertex2f( triangles[i].p[1][0], triangles[i].p[1][1] );
103 glVertex2f( triangles[i].p[2][0], triangles[i].p[2][1] );
105 glColor3f( triangles[i].color[2][0],
106 triangles[i].color[2][1],
107 triangles[i].color[2][2] );
109 glVertex2f( triangles[i].p[2][0], triangles[i].p[2][1] );
110 glVertex2f( triangles[i].p[0][0], triangles[i].p[0][1] );
122 no = triangles[triangle_cnt].no;
124 triangles[triangle_cnt].p[no][0] = p[0];
125 triangles[triangle_cnt].p[no][1] = p[1];
127 triangles[triangle_cnt].color[no][0] = edge_color[0];
128 triangles[triangle_cnt].color[no][1] = edge_color[1];
129 triangles[triangle_cnt].color[no][2] = edge_color[2];
132 if ( ++(triangles[triangle_cnt].no) == 3 ) {
134 triangles[triangle_cnt].no = 0;
363 /* draw triangles */