<p>&lt;!-- RANDOM CODE SNIPPET&nbsp;--&gt;</p><p>/* Language:: C */</p><p>void drawIniCode() {<br />&nbsp;&nbsp; &nbsp;int polygon, vertex, i, drawOption;<br />&nbsp;&nbsp; &nbsp;static GLfloat houseVertices[10][3] = {<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; {-8,-8,12},{-8,2,12},{0,8,12},{8,2,12},{8,-8,12},<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; {-8,-8,-12},{-8,2,-12},{0,8,-12},{8,2,-12},{8,-8,-12}<br />&nbsp;&nbsp; &nbsp;};<br />&nbsp;&nbsp; &nbsp;static GLint polygonIndices[7][5] = {<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; {4,3,2,1,0},{5,6,7,8,9},{0,1,6,5},{1,2,7,6},<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; {2,3,8,7},{3,4,9,8},{0,5,9,4}<br />&nbsp;&nbsp; &nbsp;};<br />&nbsp;&nbsp; &nbsp;static GLfloat faceColors[7][3] = {<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; {1,0,0},{0,1,0},{0,0,1},{1,1,0},<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; {0,1,1},{1,0,1},{1,0.65,0}<br />&nbsp;&nbsp; &nbsp;};<br />&nbsp;&nbsp; &nbsp;static int length[7] = {5,5,4,4,4,4,4};<br />&nbsp;&nbsp; &nbsp;<br />&nbsp;&nbsp; &nbsp;/* Set Camera */<br />&nbsp;&nbsp; &nbsp;glPushMatrix();<br />&nbsp;&nbsp; &nbsp;setCamera();<br /><br />&nbsp;&nbsp; &nbsp;/* Draw polygons */<br />&nbsp;&nbsp; &nbsp;glColor3f(0.0,0.0,0.0);<br /><br />&nbsp;&nbsp; &nbsp;for (polygon = 0; polygon &lt; 7; polygon++) {<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; if (!wireframe)<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; glColor3f(faceColors[polygon][0], faceColors[polygon][1],faceColors[polygon][2]);<br /><br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; /* Draw the polygon */<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; drawOption = wireframe ? GL_LINE_LOOP : GL_POLYGON;<br /><br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; glBegin(drawOption);<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; for (vertex = 0; vertex &lt; length[polygon]; vertex++)<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; for (i = 0; i &lt; 3; i++)<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; glVertex3fv(&amp;houseVertices[polygonIndices[polygon][vertex]][0]);<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; glEnd();<br />&nbsp;&nbsp; &nbsp;}<br /><br />&nbsp;&nbsp; &nbsp;glPopMatrix();<br />}