Edit

SKMeshSpecificationBuilder Class

Definition

Builds an SKMeshSpecification from attributes, varyings, and SkSL programs.

public class SKMeshSpecificationBuilder
Inheritance
SKMeshSpecificationBuilder

Constructors

Name Description
SKMeshSpecificationBuilder(String, String)

Initializes a new instance of the SKMeshSpecificationBuilder class with the specified vertex and fragment SkSL programs.

Properties

Name Description
AlphaType

Gets or sets the alpha type of the color produced by the fragment program.

Attributes

Gets the collection of vertex attributes declared on the builder.

ColorSpace

Gets or sets the color space of the color produced by the fragment program.

Varyings

Gets the collection of varyings passed from the vertex program to the fragment program.

VertexStride

Gets or sets the byte stride of a single vertex. When not explicitly set, returns the stride calculated from the added attributes.

Methods

Name Description
AddAttribute(String, SKMeshSpecificationAttributeType, Int32)

Adds a vertex attribute at the specified byte offset and updates the calculated stride if needed.

AddAttribute(String, SKMeshSpecificationAttributeType)

Adds a vertex attribute immediately after the previous attribute and advances the calculated stride by the attribute size.

AddVarying(String, SKMeshSpecificationVaryingType)

Adds a varying passed from the vertex program to the fragment program.

Build()

Builds the mesh specification.

Build(String)

Builds the mesh specification, reporting any compilation errors.

Applies to