Archived
1
Fork 0
This repository has been archived on 2025-04-12. You can view files and clone it, but cannot push or open issues or pull requests.
prism/engine/gfx/vulkan/src/gfx_vulkan_buffer.hpp

27 lines
483 B
C++
Raw Normal View History

2020-08-11 12:07:21 -04:00
#pragma once
#include <vulkan/vulkan.h>
#include "gfx_buffer.hpp"
#include "gfx_vulkan_constants.hpp"
class GFXVulkanBuffer : public GFXBuffer {
public:
bool is_dynamic_data = false;
struct Data {
VkBuffer handle;
VkDeviceMemory memory;
} data[MAX_FRAMES_IN_FLIGHT];
Data get(int frameIndex) {
if(is_dynamic_data) {
return data[frameIndex];
} else {
return data[0];
}
}
VkDeviceSize size;
};