polygon


Description:


public void polygon (TextureVertex[] vertices, bool use_color)

Draws a convex polygon using the current source material to fill / texture with according to the texture coordinates passed.

If use_color is true then the color will be changed for each vertex using the value specified in the color member of TextureVertex. This can be used for example to make the texture fade out by setting the alpha value of the color.

All of the texture coordinates must be in the range [0,1] and repeating the texture is not supported.

Because of the way this function is implemented it will currently only work if either the texture is not sliced or the backend is not OpenGL ES and the minifying and magnifying functions are both set to COGL_MATERIAL_FILTER_NEAREST.

Parameters:

vertices

An array of TextureVertex structs

use_color

true if the color member of TextureVertex should be used

n_vertices

The length of the vertices array


Namespace: Cogl
Package: cogl-1.0



2022 vala-language.org