Code cleanup

This commit is contained in:
Sascha Willems 2024-04-17 18:36:06 +02:00
parent 41e1788fcc
commit dc3ed003db
3 changed files with 24 additions and 24 deletions

View file

@ -3,7 +3,7 @@
*
* 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)
*/
@ -49,7 +49,7 @@ namespace vks
std::vector<VkExtensionProperties> extensions(extCount);
if (vkEnumerateDeviceExtensionProperties(physicalDevice, nullptr, &extCount, &extensions.front()) == VK_SUCCESS)
{
for (auto ext : extensions)
for (auto& ext : extensions)
{
supportedExtensions.push_back(ext.extensionName);
}

View file

@ -2,7 +2,7 @@
/*
* 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)
*/

View file

@ -1,7 +1,7 @@
/*
* 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)
*/
@ -28,43 +28,43 @@
#include "VulkanAndroid.h"
#endif
namespace vks
namespace vks
{
class UIOverlay
class UIOverlay
{
public:
vks::VulkanDevice *device;
VkQueue queue;
vks::VulkanDevice* device{ nullptr };
VkQueue queue{ VK_NULL_HANDLE };
VkSampleCountFlagBits rasterizationSamples = VK_SAMPLE_COUNT_1_BIT;
uint32_t subpass = 0;
VkSampleCountFlagBits rasterizationSamples{ VK_SAMPLE_COUNT_1_BIT };
uint32_t subpass{ 0 };
vks::Buffer vertexBuffer;
vks::Buffer indexBuffer;
int32_t vertexCount = 0;
int32_t indexCount = 0;
int32_t vertexCount{ 0 };
int32_t indexCount{ 0 };
std::vector<VkPipelineShaderStageCreateInfo> shaders;
VkDescriptorPool descriptorPool;
VkDescriptorSetLayout descriptorSetLayout;
VkDescriptorSet descriptorSet;
VkPipelineLayout pipelineLayout;
VkPipeline pipeline;
VkDescriptorPool descriptorPool{ VK_NULL_HANDLE };
VkDescriptorSetLayout descriptorSetLayout{ VK_NULL_HANDLE };
VkDescriptorSet descriptorSet{ VK_NULL_HANDLE };
VkPipelineLayout pipelineLayout{ VK_NULL_HANDLE };
VkPipeline pipeline{ VK_NULL_HANDLE };
VkDeviceMemory fontMemory = VK_NULL_HANDLE;
VkImage fontImage = VK_NULL_HANDLE;
VkImageView fontView = VK_NULL_HANDLE;
VkSampler sampler;
VkDeviceMemory fontMemory{ VK_NULL_HANDLE };
VkImage fontImage{ VK_NULL_HANDLE };
VkImageView fontView{ VK_NULL_HANDLE };
VkSampler sampler{ VK_NULL_HANDLE };
struct PushConstBlock {
glm::vec2 scale;
glm::vec2 translate;
} pushConstBlock;
bool visible = true;
bool updated = false;
float scale = 1.0f;
bool visible{ true };
bool updated{ false };
float scale{ 1.0f };
UIOverlay();
~UIOverlay();