Minor code cleanup
This commit is contained in:
parent
9b52fb76d8
commit
c23027d687
2 changed files with 13 additions and 13 deletions
|
|
@ -100,16 +100,16 @@ protected:
|
|||
uint32_t lastFPS = 0;
|
||||
std::chrono::time_point<std::chrono::high_resolution_clock> lastTimestamp, tPrevEnd;
|
||||
// Vulkan instance, stores all per-application states
|
||||
VkInstance instance;
|
||||
VkInstance instance{ VK_NULL_HANDLE };
|
||||
std::vector<std::string> supportedInstanceExtensions;
|
||||
// Physical device (GPU) that Vulkan will use
|
||||
VkPhysicalDevice physicalDevice;
|
||||
VkPhysicalDevice physicalDevice{ VK_NULL_HANDLE };
|
||||
// Stores physical device properties (for e.g. checking device limits)
|
||||
VkPhysicalDeviceProperties deviceProperties;
|
||||
VkPhysicalDeviceProperties deviceProperties{};
|
||||
// Stores the features available on the selected physical device (for e.g. checking if a feature is available)
|
||||
VkPhysicalDeviceFeatures deviceFeatures;
|
||||
VkPhysicalDeviceFeatures deviceFeatures{};
|
||||
// Stores all available memory (type) properties for the physical device
|
||||
VkPhysicalDeviceMemoryProperties deviceMemoryProperties;
|
||||
VkPhysicalDeviceMemoryProperties deviceMemoryProperties{};
|
||||
/** @brief Set of physical device features to be enabled for this example (must be set in the derived constructor) */
|
||||
VkPhysicalDeviceFeatures enabledFeatures{};
|
||||
/** @brief Set of device extensions to be enabled for this example (must be set in the derived constructor) */
|
||||
|
|
@ -118,13 +118,13 @@ protected:
|
|||
/** @brief Optional pNext structure for passing extension structures to device creation */
|
||||
void* deviceCreatepNextChain = nullptr;
|
||||
/** @brief Logical device, application's view of the physical device (GPU) */
|
||||
VkDevice device;
|
||||
VkDevice device{ VK_NULL_HANDLE };
|
||||
// Handle to the device graphics queue that command buffers are submitted to
|
||||
VkQueue queue;
|
||||
VkQueue queue{ VK_NULL_HANDLE };
|
||||
// Depth buffer format (selected during Vulkan initialization)
|
||||
VkFormat depthFormat;
|
||||
// Command buffer pool
|
||||
VkCommandPool cmdPool;
|
||||
VkCommandPool cmdPool{ VK_NULL_HANDLE };
|
||||
/** @brief Pipeline stages used to wait at for graphics queue submissions */
|
||||
VkPipelineStageFlags submitPipelineStages = VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT;
|
||||
// Contains command buffers and semaphores to be presented to the queue
|
||||
|
|
@ -132,17 +132,17 @@ protected:
|
|||
// Command buffers used for rendering
|
||||
std::vector<VkCommandBuffer> drawCmdBuffers;
|
||||
// Global render pass for frame buffer writes
|
||||
VkRenderPass renderPass = VK_NULL_HANDLE;
|
||||
VkRenderPass renderPass{ VK_NULL_HANDLE };
|
||||
// List of available frame buffers (same as number of swap chain images)
|
||||
std::vector<VkFramebuffer>frameBuffers;
|
||||
// Active frame buffer index
|
||||
uint32_t currentBuffer = 0;
|
||||
// Descriptor set pool
|
||||
VkDescriptorPool descriptorPool = VK_NULL_HANDLE;
|
||||
VkDescriptorPool descriptorPool{ VK_NULL_HANDLE };
|
||||
// List of shader modules created (stored for cleanup)
|
||||
std::vector<VkShaderModule> shaderModules;
|
||||
// Pipeline cache object
|
||||
VkPipelineCache pipelineCache;
|
||||
VkPipelineCache pipelineCache{ VK_NULL_HANDLE };
|
||||
// Wraps the swap chain to present images (framebuffers) to the windowing system
|
||||
VulkanSwapChain swapChain;
|
||||
// Synchronization semaphores
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue