summaryrefslogtreecommitdiff
path: root/src/vk/device.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/vk/device.cpp')
-rw-r--r--src/vk/device.cpp18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/vk/device.cpp b/src/vk/device.cpp
index b4b47fb..74727f9 100644
--- a/src/vk/device.cpp
+++ b/src/vk/device.cpp
@@ -157,10 +157,14 @@ Device::Device(VkPhysicalDevice vk_physical_device, bool with_swapchain)
// Load Shaders
{
- this->vert_shader_module = create_shader_module(
- this->device, DATA_DIR "/glsl/vert.spv");
- this->frag_shader_module = create_shader_module(
- this->device, DATA_DIR "/glsl/frag.spv");
+ this->vert3d_shader_module = create_shader_module(
+ this->device, DATA_DIR "/glsl/shader_3d.vert.spv");
+ this->frag3d_shader_module = create_shader_module(
+ this->device, DATA_DIR "/glsl/shader_3d.frag.spv");
+ this->vert2d_shader_module = create_shader_module(
+ this->device, DATA_DIR "/glsl/shader_2d.vert.spv");
+ this->frag2d_shader_module = create_shader_module(
+ this->device, DATA_DIR "/glsl/shader_2d.frag.spv");
}
this->queue_families = static_cast<QueueFamily*>(
@@ -194,8 +198,10 @@ Device::~Device()
std::free(this->queue_families);
// Destroy shaders
- vkDestroyShaderModule(this->device, this->vert_shader_module, nullptr);
- vkDestroyShaderModule(this->device, this->frag_shader_module, nullptr);
+ vkDestroyShaderModule(this->device, this->vert3d_shader_module, nullptr);
+ vkDestroyShaderModule(this->device, this->frag3d_shader_module, nullptr);
+ vkDestroyShaderModule(this->device, this->vert2d_shader_module, nullptr);
+ vkDestroyShaderModule(this->device, this->frag2d_shader_module, nullptr);
vkDeviceWaitIdle(this->device);
vkDestroyDevice(this->device, nullptr);