summaryrefslogtreecommitdiff
path: root/src/vk/device.cpp
diff options
context:
space:
mode:
authorFrederico Linhares <fred@linhares.blue>2023-01-06 17:30:12 -0300
committerFrederico Linhares <fred@linhares.blue>2023-01-06 17:30:12 -0300
commit62367a0bcca75c45eb3e7d1582c4fff18827ddc7 (patch)
tree0ac14c45bd0236104034d47401edc407ec94c94a /src/vk/device.cpp
parentb0b61c117c6e2bc7693802f005a2888e7cc073c2 (diff)
refa Use Push constants for sprites and rectangles
Diffstat (limited to 'src/vk/device.cpp')
-rw-r--r--src/vk/device.cpp20
1 files changed, 12 insertions, 8 deletions
diff --git a/src/vk/device.cpp b/src/vk/device.cpp
index 957ae6d..ea943c4 100644
--- a/src/vk/device.cpp
+++ b/src/vk/device.cpp
@@ -162,10 +162,10 @@ Device::Device(VkPhysicalDevice vk_physical_device, bool with_swapchain)
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->vert2d_solid_shader_module = create_shader_module(
+ this->device, DATA_DIR "/glsl/shader_2d_solid.vert.spv");
+ this->frag2d_solid_shader_module = create_shader_module(
+ this->device, DATA_DIR "/glsl/shader_2d_solid.frag.spv");
this->vert2d_wired_shader_module = create_shader_module(
this->device, DATA_DIR "/glsl/shader_2d_wired.vert.spv");
this->frag2d_wired_shader_module = create_shader_module(
@@ -205,10 +205,14 @@ Device::~Device()
// Destroy shaders
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);
- vkDestroyShaderModule(this->device, this->vert2d_wired_shader_module, nullptr);
- vkDestroyShaderModule(this->device, this->frag2d_wired_shader_module, nullptr);
+ vkDestroyShaderModule(
+ this->device, this->vert2d_solid_shader_module, nullptr);
+ vkDestroyShaderModule(
+ this->device, this->frag2d_solid_shader_module, nullptr);
+ vkDestroyShaderModule(
+ this->device, this->vert2d_wired_shader_module, nullptr);
+ vkDestroyShaderModule(
+ this->device, this->frag2d_wired_shader_module, nullptr);
vkDeviceWaitIdle(this->device);
vkDestroyDevice(this->device, nullptr);