diff options
| author | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2018-10-26 18:59:06 +0200 |
|---|---|---|
| committer | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2018-10-26 18:59:06 +0200 |
| commit | cf965d29b9092ea6b56847028dc885b67b1603e0 (patch) | |
| tree | dc2054210d903c5d629f0487e74a58e1b96958c3 /src/VulkanBuffer.hpp | |
| parent | a5082d2962d621dc7145614d655016c59ddacc5b (diff) | |
Diffstat (limited to 'src/VulkanBuffer.hpp')
| -rw-r--r-- | src/VulkanBuffer.hpp | 52 |
1 files changed, 0 insertions, 52 deletions
diff --git a/src/VulkanBuffer.hpp b/src/VulkanBuffer.hpp deleted file mode 100644 index ed667bf..0000000 --- a/src/VulkanBuffer.hpp +++ /dev/null @@ -1,52 +0,0 @@ -/* -* Vulkan buffer class -* -* Encapsulates a Vulkan buffer -* -* Copyright (C) 2016 by Sascha Willems - www.saschawillems.de -* -* This code is licensed under the MIT license (MIT) (http://opensource.org/licenses/MIT) -*/ - -#pragma once - -#include "vke.h" -#include "resource.hpp" - -namespace vke -{ - struct buffer_t : public Resource - { - VkBuffer buffer = VK_NULL_HANDLE; - - VkBufferCreateInfo infos = {VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO}; - - VkDescriptorBufferInfo descriptor; - VkDeviceSize size = 0; - VkDeviceSize alignment = 0; - VkBufferUsageFlags usageFlags; - VkMemoryPropertyFlags memoryPropertyFlags; - void* mapped = nullptr; - - buffer_t(device_t* _device, VkBufferUsageFlags usageFlags, VkMemoryPropertyFlags _memoryPropertyFlags, VkDeviceSize size, void *data = nullptr); - ~buffer_t(); - - VkResult map(VkDeviceSize size = VK_WHOLE_SIZE, VkDeviceSize offset = 0); - void unmap(); - - VkResult bind(VkDeviceSize offset = 0); - - void setupDescriptor(VkDeviceSize size = VK_WHOLE_SIZE, VkDeviceSize offset = 0); - - virtual VkWriteDescriptorSet getWriteDescriptorSet(VkDescriptorSet ds, uint32_t binding, VkDescriptorType descriptorType); - - void copyTo(void* data, VkDeviceSize size); - - VkResult flush(VkDeviceSize size = VK_WHOLE_SIZE, VkDeviceSize offset = 0); - - VkResult invalidate(VkDeviceSize size = VK_WHOLE_SIZE, VkDeviceSize offset = 0); - - void destroy(); - - }; -} |