Click or drag to resize

MarkerBatchPrimitiveOptionalParametersSetTextureCoordinates Method

Defines a collection of texture coordinates, one for each marker in the batch.

Namespace:  AGI.Foundation.Graphics
Assembly:  AGI.Foundation.Graphics (in AGI.Foundation.Graphics.dll) Version: 24.3.420.0 (24.3.420.0)
Syntax
public void SetTextureCoordinates(
	IEnumerable<TextureCoordinate4DF> textureCoordinates
)

Parameters

textureCoordinates
Type: System.Collections.GenericIEnumerableTextureCoordinate4DF
The texture coordinates for each marker in the batch. There must be one texture coordinate for each position passed to the MarkerBatchPrimitive's Set or SetPartial method.
Remarks

Each texture coordinate component is in the range [0, 1]. The s and t components define the bottom left corner and the p and q components define the upper right corner. When a marker uses an entire texture, the texture coordinates are [s, t, p, q] = [0, 0, 1, 1].

Per-marker texture coordinates are used to implement a technique called a texture atlas. Instead of creating several small textures and assigning each texture to markers using per-marker textures, one large texture containing all the images is made. This texture is assigned to the marker batch and each marker is given texture coordinates that index the correct part of the texture. This can lead to better performance due to the reduced number of costly texture changes during rendering.

Per-marker texture coordinates override the per-batch texture coordinate. Therefore, when per-marker texture coordinates are defined with this method, the marker batch's MarkerBatchPrimitive.TextureCoordinate property is ignored.

See Also