diff options
| author | Frederico Linhares <fred@linhares.blue> | 2022-08-30 17:45:40 -0300 | 
|---|---|---|
| committer | Frederico Linhares <fred@linhares.blue> | 2022-08-30 17:45:40 -0300 | 
| commit | f1f1576543bb4e0f3b9bc4cd0ba4a12a70546c3c (patch) | |
| tree | 87160fb7462ee5b4385ba6e9b0ccb51657b2f796 /src/vk/device.cpp | |
| parent | 42e03ddc3b28c41b81fb5410feb72750530ffa13 (diff) | |
feat Create 2d graphics pipeline
Diffstat (limited to 'src/vk/device.cpp')
| -rw-r--r-- | src/vk/device.cpp | 18 | 
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);  | 
