NAP
formatutils.h
1 /* This Source Code Form is subject to the terms of the Mozilla Public
2  * License, v. 2.0. If a copy of the MPL was not distributed with this
3  * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
4 
5 #pragma once
6 
7 // External includes
8 #include <rtti/typeinfo.h>
9 #include <nap/numeric.h>
10 #include <nap/assert.h>
11 #include <mathutils.h>
12 #include <vulkan/vulkan_core.h>
13 
14 // Local includes
15 #include "shadervariabledeclarations.h"
16 
17 namespace nap
18 {
24  NAPAPI VkBufferUsageFlags getVulkanBufferUsage(nap::EDescriptorType descriptorType);
25 
32  NAPAPI VkDescriptorType getVulkanDescriptorType(nap::EDescriptorType descriptorType);
33 
39  NAPAPI VkFormat getVulkanFormat(nap::rtti::TypeInfo type);
40 
46  template<typename ELEMENTTYPE>
47  VkFormat getVulkanFormat() { return getVulkanFormat(RTTI_OF(ELEMENTTYPE)); }
48 }
nap::getVulkanBufferUsage
NAPAPI VkBufferUsageFlags getVulkanBufferUsage(nap::EDescriptorType descriptorType)
nap::getVulkanFormat
NAPAPI VkFormat getVulkanFormat(nap::rtti::TypeInfo type)
nap::getVulkanDescriptorType
NAPAPI VkDescriptorType getVulkanDescriptorType(nap::EDescriptorType descriptorType)
nap::EDescriptorType
EDescriptorType
Definition: shadervariabledeclarations.h:28
nap
Definition: templateapp.h:17
nap::rtti::TypeInfo
rttr::type TypeInfo
Definition: typeinfo.h:140