Home | All Classes | Grouped Classes | Index | Search

CL_GraphicContext::draw_triangles

Draw triangles with color array (optionally textured). Draw triangles with single color (optionally textured).

	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);

Parameters:

unsigned int count
number of triangles to draw
bool fill
draw filled/outline
double *vertices
pointer to array of triangle vertices (x y z x y z x...)
unsigned char *color
pointer to array of triangle vertice colors (r b g a r g b a r...)
int *uv
(optional) pointer to array of triangle vertice texture coordinates (u v u v u...)
CL_Surface *texture
(optional) texture to use
unsigned int count
number of triangles to draw
bool fill
draw filled/outline
double *vertices
pointer to array of triangle vertices (x y z x y z x...)
CL_Color &color
triangle color
int *uv
(optional) pointer to array of triangle vertice texture coordinates (u v u v u...)
CL_Surface *texture
(optional) texture to use

Detailed description:

uchar color array, range: 0-255 integer (pixel) texture coordinates

single color integer (pixel) texture coordinates

See also:

CL_Color | CL_GraphicContext | CL_Surface



Questions or comments, write to the ClanLib mailing list.