Exemplo n.º 1
0
 /// <summary>
 /// Map a memory object into application address space.
 /// </summary>
 public void MapMemory(DeviceSize offset, DeviceSize size, MemoryMapFlags flags, ref IntPtr data)
 {
     unsafe
     {
         try
         {
             Result commandResult;
             void * marshalledData;
             commandResult = Interop.Commands.vkMapMemory(this.parent.handle, this.handle, offset, size, flags, &marshalledData);
             if (SharpVkException.IsError(commandResult))
             {
                 throw SharpVkException.Create(commandResult);
             }
             data = new IntPtr(marshalledData);
         }
         finally
         {
             Interop.HeapUtil.FreeLog();
         }
     }
 }
Exemplo n.º 2
0
 public unsafe IntPtr MapMemory(DeviceMemory memory, ulong offset, ulong size, MemoryMapFlags flags)
 {
     IntPtr data;
     vkMapMemory(this, memory, offset, size, flags, &data).CheckError();
     return data;
 }
Exemplo n.º 3
0
 internal static unsafe extern Result vkMapMemory(Device device, DeviceMemory memory, ulong offset, ulong size, MemoryMapFlags flags, IntPtr* data);