Edit

SKMeshSpecification.Create Method

Definition

Creates a mesh specification with an explicit color space and alpha type, reporting any compilation errors.

public static SkiaSharp.SKMeshSpecification? Create(ReadOnlySpan<SkiaSharp.SKMeshSpecificationAttribute> attributes, int vertexStride, ReadOnlySpan<SkiaSharp.SKMeshSpecificationVarying> varyings, string vertexShader, string fragmentShader, SkiaSharp.SKColorSpace? colorSpace, SkiaSharp.SKAlphaType alphaType, out string? errors);

Parameters

attributes
ReadOnlySpan<SKMeshSpecificationAttribute>

The per-vertex attributes declared by the mesh.

vertexStride
Int32

The size of a single vertex, in bytes.

varyings
ReadOnlySpan<SKMeshSpecificationVarying>

The values passed from the vertex program to the fragment program.

vertexShader
String

The SkSL source of the vertex program.

fragmentShader
String

The SkSL source of the fragment program.

colorSpace
SKColorSpace

The color space of the color the fragment program produces, or null for none.

alphaType
SKAlphaType

The alpha type of the color the fragment program produces.

errors
String

When this method returns, contains the message describing why creation failed, or null on success.

Returns

The specification, or null if it could not be created.

Applies to