public void Bind(DeviceMemory deviceMemory, ulong offset) { if (deviceMemory == null) { throw new ArgumentNullException(nameof(deviceMemory)); } var result = Device.Commands.bindBuffer(Device.Native, buffer, deviceMemory.Native, offset); if (result != VkResult.Success) { throw new BufferException(string.Format("Error binding buffer: {0}", result)); } Offset = offset; Memory = deviceMemory; }
public void Bind(DeviceMemory memory, ulong offset) { Device.Commands.bindImageMemory(Device.Native, image, memory.Native, offset); Memory = memory; Offset = offset; }