rectangle_with_multitexture_coords


Description:


public void rectangle_with_multitexture_coords (float x1, float y1, float x2, float y2, float tex_coords, int tex_coords_len)

This function draws a rectangle using the current source material to texture or fill with.

As a material may contain multiple texture layers this interface lets you supply texture coordinates for each layer of the material.

The first pair of coordinates are for the first layer (with the smallest layer index) and if you supply less texture coordinates than there are layers in the current source material then default texture coordinates (0.0, 0.0, 1.0, 1.0) are generated.

Parameters:

x1

x coordinate upper left on screen.

y1

y coordinate upper left on screen.

x2

x coordinate lower right on screen.

y2

y coordinate lower right on screen.

tex_coords

An array containing groups of 4 float values: [tx1, ty1, tx2, ty2] that are interpreted as two texture coordinates; one for the upper left texel, and one for the lower right texel. Each value should be between 0.0 and 1.0, where the coordinate (0.0, 0.0) represents the top left of the texture, and (1.0, 1.0) the bottom right.

tex_coords_len

The length of the tex_coords array. (e.g. for one layer and one group of texture coordinates, this would be 4)


Namespace: Cogl
Package: cogl-1.0



2022 vala-language.org