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
This commit is part of merge request !18. Comments created here will be created in the context of that merge request.
......@@ -7,11 +7,11 @@
#include <vulkan/vulkan.hpp>
#include "vkcv/Context.hpp"
#include "vkcv/Handles.hpp"
#include "vkcv/Buffer.hpp"
namespace vkcv
{
// TODO:
class Buffer;
class Renderpass;
class Pipeline;
......@@ -92,7 +92,16 @@ namespace vkcv
std::vector<const char*> deviceExtensions = {});
// 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) ;
PipelineHandle createPipeline(const Pipeline &pipeline);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment