private void PlatformConstruct( VertexAttributeDescription[] attributeDescriptions, VertexLayoutDescription[] layoutDescriptions) { DeviceVertexDescriptor = AddDisposable(MTLVertexDescriptor.Create()); for (var i = 0; i < attributeDescriptions.Length; i++) { var attributeDescriptor = DeviceVertexDescriptor.Attributes[i]; attributeDescriptor.Format = attributeDescriptions[i].Format.ToMTLVertexFormat(); attributeDescriptor.BufferIndex = (nuint)attributeDescriptions[i].BufferIndex; attributeDescriptor.Offset = (nuint)attributeDescriptions[i].Offset; } for (var i = 0; i < layoutDescriptions.Length; i++) { var layoutDescriptor = DeviceVertexDescriptor.Layouts[i]; layoutDescriptor.StepFunction = layoutDescriptions[i].Classification.ToMTLVertexStepFunction(); layoutDescriptor.StepRate = 1; layoutDescriptor.Stride = (nuint)layoutDescriptions[i].Stride; } }
private void PlatformConstruct() { DeviceVertexDescriptor = MTLVertexDescriptor.Create(); }