diff options
author | Frederico Linhares <fred@linhares.blue> | 2023-10-09 14:46:09 -0300 |
---|---|---|
committer | Frederico Linhares <fred@linhares.blue> | 2023-10-09 15:58:14 -0300 |
commit | ba447583c74d44c6b07c5409918207157f921efe (patch) | |
tree | 56cd1c36a8e77540136c8871eb3b94f0adf37139 /src/vk/device.cpp | |
parent | 8fa221cb60c19638d4ad0833965fee605593eea3 (diff) |
feat Render sprite in a 3D position
Diffstat (limited to 'src/vk/device.cpp')
-rw-r--r-- | src/vk/device.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/vk/device.cpp b/src/vk/device.cpp index ea943c4..83bdf38 100644 --- a/src/vk/device.cpp +++ b/src/vk/device.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2022 Frederico de Oliveira Linhares + * Copyright 2022-2023 Frederico de Oliveira Linhares * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -158,6 +158,10 @@ Device::Device(VkPhysicalDevice vk_physical_device, bool with_swapchain) // Load Shaders { + this->vert_sprite_3d_shader_module = create_shader_module( + this->device, DATA_DIR "/glsl/shader_sprite_3d.vert.spv"); + this->frag_sprite_3d_shader_module = create_shader_module( + this->device, DATA_DIR "/glsl/shader_sprite_3d.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( @@ -203,6 +207,10 @@ Device::~Device() std::free(this->queue_families); // Destroy shaders + vkDestroyShaderModule( + this->device, this->vert_sprite_3d_shader_module, nullptr); + vkDestroyShaderModule( + this->device, this->frag_sprite_3d_shader_module, nullptr); vkDestroyShaderModule(this->device, this->vert3d_shader_module, nullptr); vkDestroyShaderModule(this->device, this->frag3d_shader_module, nullptr); vkDestroyShaderModule( |