MTKMesh.FromAsset(MDLAsset, IMTLDevice, MDLMesh[], NSError) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Creates MetalKit meshes from the meshes in a Model I/O asset.
public static MetalKit.MTKMesh[]? FromAsset(ModelIO.MDLAsset asset, Metal.IMTLDevice device, out ModelIO.MDLMesh[] sourceMeshes, out Foundation.NSError error);
public static MetalKit.MTKMesh[]? FromAsset(ModelIO.MDLAsset asset, Metal.IMTLDevice device, out ModelIO.MDLMesh[]? sourceMeshes, out Foundation.NSError error);
static member FromAsset : ModelIO.MDLAsset * Metal.IMTLDevice * MDLMesh[] * NSError -> MetalKit.MTKMesh[]
Parameters
- asset
- MDLAsset
The asset containing the source meshes.
- device
- IMTLDevice
The Metal device on which to create the mesh resources.
- sourceMeshes
- MDLMesh[]
The Model I/O meshes corresponding to the returned MetalKit meshes.
- error
- NSError
On failure, contains an error that describes the problem.
Returns
The created MetalKit meshes, or null if they could not be created.