<!-- clanlib header begin --> <HTML> <HEAD> <TITLE>CL_Display::draw_triangles - ClanLib Game SDK</TITLE> <STYLE TYPE="text/css"><!-- HTML BODY { font-family: verdana, helvetica, sans-serif; font-size: 12px; } H1 { font-size: 22px; } H2 { font-size: 18px; } H3 { font-size: 16px; } H4 { font-size: 14px; } P { font-size: 12px; } LI { font-size: 12px; } --></STYLE> </HEAD> <body bgcolor=white text=black link=blue vlink=#800080> <center> <img src="http://clanlib.org/gfx/clanlib.png"> </center> <!-- clanlib header end --> <center> <p> <a href="http://clanlib.org/docs.html">Home</a> | <a href="classes.html">All Classes</a> | <a href="modules.html">Grouped Classes</a> | <a href="index.html">Index</a> | <a href="search.html">Search</a> </p> </center> <h1>CL_Display::draw_triangles</h1> <p> Draw triangles with color array (optionally textured). Draw triangles with single color (optionally textured).</p> <pre> void draw_triangles( unsigned int count, bool fill, double* vertices, unsigned char* color, int* uv=0, CL_Surface* texture=0); void draw_triangles( unsigned int count, bool fill, double* vertices, const CL_Color& color, int* uv=0, CL_Surface* texture=0); </pre> <p><b>Parameters:</b></p> <dl> <dt><i>unsigned int count </i></dt><dd>number of triangles to draw</dd> <dt><i>bool fill </i></dt><dd>draw filled/outline</dd> <dt><i>double *vertices </i></dt><dd>pointer to array of triangle vertices (x y z x y z x...)</dd> <dt><i>unsigned char *color </i></dt><dd>pointer to array of triangle vertice colors (r b g a r g b a r...)</dd> <dt><i>int *uv </i></dt><dd>(optional) pointer to array of triangle vertice texture coordinates (u v u v u...)</dd> <dt><i>CL_Surface *texture </i></dt><dd>(optional) texture to use</dd> <dt><i>unsigned int count </i></dt><dd>number of triangles to draw</dd> <dt><i>bool fill </i></dt><dd>draw filled/outline</dd> <dt><i>double *vertices </i></dt><dd>pointer to array of triangle vertices (x y z x y z x...)</dd> <dt><i>CL_Color &color </i></dt><dd>triangle color</dd> <dt><i>int *uv </i></dt><dd>(optional) pointer to array of triangle vertice texture coordinates (u v u v u...)</dd> <dt><i>CL_Surface *texture </i></dt><dd>(optional) texture to use</dd> </dl> <p><b>Detailed description:</b></p> <p>uchar color array, range: 0-255 integer (pixel) texture coordinates</p> <p>single color integer (pixel) texture coordinates</p> <p><b>See also:</b></p> <p><a href="CL_Surface.html">CL_Surface</a> | <a href="CL_Display.html">CL_Display</a> | <a href="CL_Color.html">CL_Color</a></p> <!-- clanlib footer begin --> <center><br><br><font color="#a0a0a0"> Questions or comments, write to the <a href="http://clanlib.org/contact.html">ClanLib mailing list</a>. </font></center> </body> </html> <!-- clanlib footer end -->