Code cleanup
This commit is contained in:
parent
41e1788fcc
commit
dc3ed003db
3 changed files with 24 additions and 24 deletions
|
|
@ -3,7 +3,7 @@
|
||||||
*
|
*
|
||||||
* Encapsulates a physical Vulkan device and its logical representation
|
* Encapsulates a physical Vulkan device and its logical representation
|
||||||
*
|
*
|
||||||
* Copyright (C) 2016-2023 by Sascha Willems - www.saschawillems.de
|
* Copyright (C) 2016-2024 by Sascha Willems - www.saschawillems.de
|
||||||
*
|
*
|
||||||
* This code is licensed under the MIT license (MIT) (http://opensource.org/licenses/MIT)
|
* This code is licensed under the MIT license (MIT) (http://opensource.org/licenses/MIT)
|
||||||
*/
|
*/
|
||||||
|
|
@ -49,7 +49,7 @@ namespace vks
|
||||||
std::vector<VkExtensionProperties> extensions(extCount);
|
std::vector<VkExtensionProperties> extensions(extCount);
|
||||||
if (vkEnumerateDeviceExtensionProperties(physicalDevice, nullptr, &extCount, &extensions.front()) == VK_SUCCESS)
|
if (vkEnumerateDeviceExtensionProperties(physicalDevice, nullptr, &extCount, &extensions.front()) == VK_SUCCESS)
|
||||||
{
|
{
|
||||||
for (auto ext : extensions)
|
for (auto& ext : extensions)
|
||||||
{
|
{
|
||||||
supportedExtensions.push_back(ext.extensionName);
|
supportedExtensions.push_back(ext.extensionName);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
/*
|
/*
|
||||||
* UI overlay class using ImGui
|
* UI overlay class using ImGui
|
||||||
*
|
*
|
||||||
* Copyright (C) 2017 by Sascha Willems - www.saschawillems.de
|
* Copyright (C) 2017-2024 by Sascha Willems - www.saschawillems.de
|
||||||
*
|
*
|
||||||
* This code is licensed under the MIT license (MIT) (http://opensource.org/licenses/MIT)
|
* This code is licensed under the MIT license (MIT) (http://opensource.org/licenses/MIT)
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* UI overlay class using ImGui
|
* UI overlay class using ImGui
|
||||||
*
|
*
|
||||||
* Copyright (C) 2017 by Sascha Willems - www.saschawillems.de
|
* Copyright (C) 2017-2024 by Sascha Willems - www.saschawillems.de
|
||||||
*
|
*
|
||||||
* This code is licensed under the MIT license (MIT) (http://opensource.org/licenses/MIT)
|
* This code is licensed under the MIT license (MIT) (http://opensource.org/licenses/MIT)
|
||||||
*/
|
*/
|
||||||
|
|
@ -33,38 +33,38 @@ namespace vks
|
||||||
class UIOverlay
|
class UIOverlay
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
vks::VulkanDevice *device;
|
vks::VulkanDevice* device{ nullptr };
|
||||||
VkQueue queue;
|
VkQueue queue{ VK_NULL_HANDLE };
|
||||||
|
|
||||||
VkSampleCountFlagBits rasterizationSamples = VK_SAMPLE_COUNT_1_BIT;
|
VkSampleCountFlagBits rasterizationSamples{ VK_SAMPLE_COUNT_1_BIT };
|
||||||
uint32_t subpass = 0;
|
uint32_t subpass{ 0 };
|
||||||
|
|
||||||
vks::Buffer vertexBuffer;
|
vks::Buffer vertexBuffer;
|
||||||
vks::Buffer indexBuffer;
|
vks::Buffer indexBuffer;
|
||||||
int32_t vertexCount = 0;
|
int32_t vertexCount{ 0 };
|
||||||
int32_t indexCount = 0;
|
int32_t indexCount{ 0 };
|
||||||
|
|
||||||
std::vector<VkPipelineShaderStageCreateInfo> shaders;
|
std::vector<VkPipelineShaderStageCreateInfo> shaders;
|
||||||
|
|
||||||
VkDescriptorPool descriptorPool;
|
VkDescriptorPool descriptorPool{ VK_NULL_HANDLE };
|
||||||
VkDescriptorSetLayout descriptorSetLayout;
|
VkDescriptorSetLayout descriptorSetLayout{ VK_NULL_HANDLE };
|
||||||
VkDescriptorSet descriptorSet;
|
VkDescriptorSet descriptorSet{ VK_NULL_HANDLE };
|
||||||
VkPipelineLayout pipelineLayout;
|
VkPipelineLayout pipelineLayout{ VK_NULL_HANDLE };
|
||||||
VkPipeline pipeline;
|
VkPipeline pipeline{ VK_NULL_HANDLE };
|
||||||
|
|
||||||
VkDeviceMemory fontMemory = VK_NULL_HANDLE;
|
VkDeviceMemory fontMemory{ VK_NULL_HANDLE };
|
||||||
VkImage fontImage = VK_NULL_HANDLE;
|
VkImage fontImage{ VK_NULL_HANDLE };
|
||||||
VkImageView fontView = VK_NULL_HANDLE;
|
VkImageView fontView{ VK_NULL_HANDLE };
|
||||||
VkSampler sampler;
|
VkSampler sampler{ VK_NULL_HANDLE };
|
||||||
|
|
||||||
struct PushConstBlock {
|
struct PushConstBlock {
|
||||||
glm::vec2 scale;
|
glm::vec2 scale;
|
||||||
glm::vec2 translate;
|
glm::vec2 translate;
|
||||||
} pushConstBlock;
|
} pushConstBlock;
|
||||||
|
|
||||||
bool visible = true;
|
bool visible{ true };
|
||||||
bool updated = false;
|
bool updated{ false };
|
||||||
float scale = 1.0f;
|
float scale{ 1.0f };
|
||||||
|
|
||||||
UIOverlay();
|
UIOverlay();
|
||||||
~UIOverlay();
|
~UIOverlay();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue