PeriDyno
1.0.0
Loading...
Searching...
No Matches
D:
Peridyno
peridyno
src
Core
Backend
Vulkan
VkVariable.cpp
Go to the documentation of this file.
1
#include "
VkVariable.h
"
2
#include "
VkSystem.h
"
3
4
namespace
dyno
{
5
6
VkVariable::VkVariable
()
7
{
8
buffer
= std::make_shared<vks::Buffer>();
9
ctx
=
VkSystem::instance
()->
currentContext
();
10
}
11
12
VkVariable::~VkVariable
()
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
}
VkSystem.h
VkVariable.h
dyno::VkSystem::currentContext
VkContext * currentContext()
Definition
VkSystem.h:21
dyno::VkSystem::instance
static VkSystem * instance()
Definition
VkSystem.cpp:10
dyno::VkVariable::~VkVariable
~VkVariable()
Definition
VkVariable.cpp:12
dyno::VkVariable::VkVariable
VkVariable()
Definition
VkVariable.cpp:6
dyno::VkVariable::ctx
VkContext * ctx
Definition
VkVariable.h:48
dyno::VkVariable::buffer
std::shared_ptr< vks::Buffer > buffer
Definition
VkVariable.h:50
dyno::VkVariable::descriptorType
static VkDescriptorType descriptorType(const VariableType varType)
Definition
VkVariable.cpp:18
dyno
This is an implementation of AdditiveCCD based on peridyno.
Definition
Array.h:25
dyno::VariableType
VariableType
Definition
VkVariable.h:14
dyno::DeviceBuffer
@ DeviceBuffer
Device buffer.
Definition
VkVariable.h:15
dyno::Uniform
@ Uniform
Uniform variable.
Definition
VkVariable.h:18
Generated by
1.13.2