/// <summary> /// /// </summary> /// <param name="pointer"> /// </param> internal static unsafe WriteDescriptorSetInlineUniformBlock MarshalFrom(SharpVk.Interop.Multivendor.WriteDescriptorSetInlineUniformBlock *pointer) { WriteDescriptorSetInlineUniformBlock result = default(WriteDescriptorSetInlineUniformBlock); if (pointer->Data != null) { var fieldPointer = new byte[(uint)(pointer->DataSize)]; for (int index = 0; index < (uint)(pointer->DataSize); index++) { fieldPointer[index] = pointer->Data[index]; } result.Data = fieldPointer; } else { result.Data = null; } return(result); }
/// <summary> /// /// </summary> /// <param name="pointer"> /// </param> internal unsafe void MarshalTo(SharpVk.Interop.Multivendor.WriteDescriptorSetInlineUniformBlock *pointer) { pointer->SType = StructureType.WriteDescriptorSetInlineUniformBlock; pointer->Next = null; pointer->DataSize = (uint)(Interop.HeapUtil.GetLength(this.Data)); if (this.Data != null) { var fieldPointer = (byte *)(Interop.HeapUtil.AllocateAndClear <byte>(this.Data.Length).ToPointer()); for (int index = 0; index < (uint)(this.Data.Length); index++) { fieldPointer[index] = this.Data[index]; } pointer->Data = fieldPointer; } else { pointer->Data = null; } }