PeriDyno 1.0.0
Loading...
Searching...
No Matches
VkVariable.cpp
Go to the documentation of this file.
1#include "VkVariable.h"
2#include "VkSystem.h"
3
4namespace dyno {
5
7 {
8 buffer = std::make_shared<vks::Buffer>();
10 }
11
13 {
14 // TODO: sovle other issue while destroy buffer here.
15 // buffer.destroy();
16 }
17
18 VkDescriptorType VkVariable::descriptorType(const VariableType varType)
19 {
20 switch (varType)
21 {
22 case DeviceBuffer:
23 return VK_DESCRIPTOR_TYPE_STORAGE_BUFFER;
24 case Uniform:
25 return VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER;
26 default:
27 break;
28 }
29
30 return VK_DESCRIPTOR_TYPE_MAX_ENUM;
31 }
32
33}
VkContext * currentContext()
Definition VkSystem.h:21
static VkSystem * instance()
Definition VkSystem.cpp:10
VkContext * ctx
Definition VkVariable.h:48
std::shared_ptr< vks::Buffer > buffer
Definition VkVariable.h:50
static VkDescriptorType descriptorType(const VariableType varType)
This is an implementation of AdditiveCCD based on peridyno.
Definition Array.h:25
VariableType
Definition VkVariable.h:14
@ DeviceBuffer
Device buffer.
Definition VkVariable.h:15
@ Uniform
Uniform variable.
Definition VkVariable.h:18