Skip to content
Snippets Groups Projects
Commit 93f66c38 authored by Lars Hoerttrich's avatar Lars Hoerttrich
Browse files

[#22] Added createBuffer()-template-function to core. Uses buffer instead of handle for now

parent 054ee07c
No related branches found
No related tags found
1 merge request!18Resolve "Resource Management"
Pipeline #24794 failed
...@@ -7,11 +7,11 @@ ...@@ -7,11 +7,11 @@
#include <vulkan/vulkan.hpp> #include <vulkan/vulkan.hpp>
#include "vkcv/Context.hpp" #include "vkcv/Context.hpp"
#include "vkcv/Handles.hpp" #include "vkcv/Handles.hpp"
#include "vkcv/Buffer.hpp"
namespace vkcv namespace vkcv
{ {
// TODO: // TODO:
class Buffer;
class Renderpass; class Renderpass;
class Pipeline; class Pipeline;
...@@ -92,7 +92,16 @@ namespace vkcv ...@@ -92,7 +92,16 @@ namespace vkcv
std::vector<const char*> deviceExtensions = {}); std::vector<const char*> deviceExtensions = {});
// TODO: // TODO:
BufferHandle createBuffer(const Buffer &buf); /**
* Creates a #Buffer with data-type T and @p bufferType
* @param bufferType Type of Buffer created
* @param size Amount of Data of type T
* return Buffer-Object
*/
template<typename T>
Buffer<T> createBuffer(vkcv::BufferType bufferType,size_t size) {
return Buffer<T>(m_Context.getDevice(),m_Context.getPhysicalDevice, bufferType,size);
};
PassHandle createRenderPass(const Renderpass &pass) ; PassHandle createRenderPass(const Renderpass &pass) ;
PipelineHandle createPipeline(const Pipeline &pipeline); PipelineHandle createPipeline(const Pipeline &pipeline);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment