diff --git a/base/VulkanBuffer.hpp b/base/VulkanBuffer.hpp index 59033ce8..5a630f22 100644 --- a/base/VulkanBuffer.hpp +++ b/base/VulkanBuffer.hpp @@ -33,7 +33,7 @@ namespace vks /** @brief Usage flags to be filled by external source at buffer creation (to query at some later point) */ VkBufferUsageFlags usageFlags; - /** @brief Memory propertys flags to be filled by external source at buffer creation (to query at some later point) */ + /** @brief Memory property flags to be filled by external source at buffer creation (to query at some later point) */ VkMemoryPropertyFlags memoryPropertyFlags; /** diff --git a/base/VulkanDebug.cpp b/base/VulkanDebug.cpp index f2eded93..4ba9f9d3 100644 --- a/base/VulkanDebug.cpp +++ b/base/VulkanDebug.cpp @@ -60,7 +60,7 @@ namespace vks #endif - // The return value of this callback controls wether the Vulkan call that caused the validation message will be aborted or not + // The return value of this callback controls whether the Vulkan call that caused the validation message will be aborted or not // We return VK_FALSE as we DON'T want Vulkan calls that cause a validation message to abort // If you instead want to have calls abort, pass in VK_TRUE and the function will return VK_ERROR_VALIDATION_FAILED_EXT return VK_FALSE; @@ -170,7 +170,7 @@ namespace vks void endRegion(VkCommandBuffer cmdBuffer) { - // Check for valid function (may not be present if not runnin in a debugging application) + // Check for valid function (may not be present if not running in a debugging application) if (pfnCmdDebugMarkerEnd) { pfnCmdDebugMarkerEnd(cmdBuffer); diff --git a/base/VulkanDevice.hpp b/base/VulkanDevice.hpp index 6cbdf069..2d20dc01 100644 --- a/base/VulkanDevice.hpp +++ b/base/VulkanDevice.hpp @@ -443,7 +443,7 @@ namespace vks * @param queue Pointer * @param copyRegion (Optional) Pointer to a copy region, if NULL, the whole buffer is copied * - * @note Source and destionation pointers must have the approriate transfer usage flags set (TRANSFER_SRC / TRANSFER_DST) + * @note Source and destination pointers must have the appropriate transfer usage flags set (TRANSFER_SRC / TRANSFER_DST) */ void copyBuffer(vks::Buffer *src, vks::Buffer *dst, VkQueue queue, VkBufferCopy *copyRegion = nullptr) { diff --git a/base/VulkanFrameBuffer.hpp b/base/VulkanFrameBuffer.hpp index 3bd5304e..5e5b9a5c 100644 --- a/base/VulkanFrameBuffer.hpp +++ b/base/VulkanFrameBuffer.hpp @@ -231,7 +231,7 @@ namespace vks * * @param magFilter Magnification filter for lookups * @param minFilter Minification filter for lookups - * @param adressMode Adressing mode for the U,V and W coordinates + * @param adressMode Addressing mode for the U,V and W coordinates * * @return VkResult for the sampler creation */ diff --git a/base/VulkanHeightmap.hpp b/base/VulkanHeightmap.hpp index c96a3faa..96da0685 100644 --- a/base/VulkanHeightmap.hpp +++ b/base/VulkanHeightmap.hpp @@ -146,7 +146,7 @@ namespace vks switch (topology) { - // Indices for triangles + // Indices for triangles case topologyTriangles: { indices = new uint32_t[w * w * 6]; diff --git a/base/VulkanSwapChain.hpp b/base/VulkanSwapChain.hpp index 67bff976..fc36e6aa 100644 --- a/base/VulkanSwapChain.hpp +++ b/base/VulkanSwapChain.hpp @@ -214,7 +214,7 @@ public: VK_CHECK_RESULT(fpGetPhysicalDeviceSurfaceFormatsKHR(physicalDevice, surface, &formatCount, surfaceFormats.data())); // If the surface format list only includes one entry with VK_FORMAT_UNDEFINED, - // there is no preferered format, so we assume VK_FORMAT_B8G8R8A8_UNORM + // there is no preferred format, so we assume VK_FORMAT_B8G8R8A8_UNORM if ((formatCount == 1) && (surfaceFormats[0].format == VK_FORMAT_UNDEFINED)) { colorFormat = VK_FORMAT_B8G8R8A8_UNORM; @@ -276,7 +276,7 @@ public: * * @param width Pointer to the width of the swapchain (may be adjusted to fit the requirements of the swapchain) * @param height Pointer to the height of the swapchain (may be adjusted to fit the requirements of the swapchain) - * @param vsync (Optional) Can be used to force vsync'd rendering (by using VK_PRESENT_MODE_FIFO_KHR as presentation mode) + * @param vsync (Optional) Can be used to force vsync-ed rendering (by using VK_PRESENT_MODE_FIFO_KHR as presentation mode) */ void create(uint32_t *width, uint32_t *height, bool vsync = false) { diff --git a/base/VulkanTexture.hpp b/base/VulkanTexture.hpp index 79086ed1..9ac5c62e 100644 --- a/base/VulkanTexture.hpp +++ b/base/VulkanTexture.hpp @@ -121,7 +121,7 @@ namespace vks ktx_uint8_t *ktxTextureData = ktxTexture_GetData(ktxTexture); ktx_size_t ktxTextureSize = ktxTexture_GetSize(ktxTexture); - // Get device properites for the requested texture format + // Get device properties for the requested texture format VkFormatProperties formatProperties; vkGetPhysicalDeviceFormatProperties(device->physicalDevice, format, &formatProperties); @@ -334,7 +334,7 @@ namespace vks ktxTexture_Destroy(ktxTexture); - // Create a defaultsampler + // Create a default sampler VkSamplerCreateInfo samplerCreateInfo = {}; samplerCreateInfo.sType = VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO; samplerCreateInfo.magFilter = VK_FILTER_LINEAR; @@ -348,7 +348,7 @@ namespace vks samplerCreateInfo.minLod = 0.0f; // Max level-of-detail should match mip level count samplerCreateInfo.maxLod = (useStaging) ? (float)mipLevels : 0.0f; - // Only enable anisotropic filtering if enabled on the devicec + // Only enable anisotropic filtering if enabled on the device samplerCreateInfo.maxAnisotropy = device->enabledFeatures.samplerAnisotropy ? device->properties.limits.maxSamplerAnisotropy : 1.0f; samplerCreateInfo.anisotropyEnable = device->enabledFeatures.samplerAnisotropy; samplerCreateInfo.borderColor = VK_BORDER_COLOR_FLOAT_OPAQUE_WHITE; diff --git a/base/VulkanglTFModel.cpp b/base/VulkanglTFModel.cpp index 757a868b..044ccce0 100644 --- a/base/VulkanglTFModel.cpp +++ b/base/VulkanglTFModel.cpp @@ -308,7 +308,7 @@ void vkglTF::Texture::fromglTfImage(tinygltf::Image &gltfimage, std::string path // @todo: Use ktxTexture_GetVkFormat(ktxTexture) format = VK_FORMAT_R8G8B8A8_UNORM; - // Get device properites for the requested texture format + // Get device properties for the requested texture format VkFormatProperties formatProperties; vkGetPhysicalDeviceFormatProperties(device->physicalDevice, format, &formatProperties); diff --git a/base/threadpool.hpp b/base/threadpool.hpp index e5dc1476..d14ecf71 100644 --- a/base/threadpool.hpp +++ b/base/threadpool.hpp @@ -98,7 +98,7 @@ namespace vks public: std::vector> threads; - // Sets the number of threads to be allocted in this pool + // Sets the number of threads to be allocated in this pool void setThreadCount(uint32_t count) { threads.clear(); diff --git a/base/vulkanexamplebase.cpp b/base/vulkanexamplebase.cpp index 7290c9ca..b0e85f28 100644 --- a/base/vulkanexamplebase.cpp +++ b/base/vulkanexamplebase.cpp @@ -178,7 +178,7 @@ VkPipelineShaderStageCreateInfo VulkanExampleBase::loadShader(std::string fileNa #else shaderStage.module = vks::tools::loadShader(fileName.c_str(), device); #endif - shaderStage.pName = "main"; // todo : make param + shaderStage.pName = "main"; assert(shaderStage.module != VK_NULL_HANDLE); shaderModules.push_back(shaderStage.module); return shaderStage; @@ -814,7 +814,7 @@ bool VulkanExampleBase::initVulkan() if (settings.validation) { // The report flags determine what type of messages for the layers will be displayed - // For validating (debugging) an appplication the error and warning bits should suffice + // For validating (debugging) an application the error and warning bits should suffice VkDebugReportFlagsEXT debugReportFlags = VK_DEBUG_REPORT_ERROR_BIT_EXT | VK_DEBUG_REPORT_WARNING_BIT_EXT; // Additional flags include performance info, loader and layer debug messages, etc. vks::debug::setupDebugging(instance, debugReportFlags, VK_NULL_HANDLE); @@ -891,7 +891,7 @@ bool VulkanExampleBase::initVulkan() physicalDevice = physicalDevices[selectedDevice]; - // Store properties (including limits), features and memory properties of the phyiscal device (so that examples can check against them) + // Store properties (including limits), features and memory properties of the physical device (so that examples can check against them) vkGetPhysicalDeviceProperties(physicalDevice, &deviceProperties); vkGetPhysicalDeviceFeatures(physicalDevice, &deviceFeatures); vkGetPhysicalDeviceMemoryProperties(physicalDevice, &deviceMemoryProperties); @@ -922,10 +922,10 @@ bool VulkanExampleBase::initVulkan() // Create synchronization objects VkSemaphoreCreateInfo semaphoreCreateInfo = vks::initializers::semaphoreCreateInfo(); // Create a semaphore used to synchronize image presentation - // Ensures that the image is displayed before we start submitting new commands to the queu + // Ensures that the image is displayed before we start submitting new commands to the queue VK_CHECK_RESULT(vkCreateSemaphore(device, &semaphoreCreateInfo, nullptr, &semaphores.presentComplete)); // Create a semaphore used to synchronize command submission - // Ensures that the image is not presented until all commands have been sumbitted and executed + // Ensures that the image is not presented until all commands have been submitted and executed VK_CHECK_RESULT(vkCreateSemaphore(device, &semaphoreCreateInfo, nullptr, &semaphores.renderComplete)); // Set up submit info structure @@ -2116,10 +2116,7 @@ void VulkanExampleBase::setupRenderPass() VK_CHECK_RESULT(vkCreateRenderPass(device, &renderPassInfo, nullptr, &renderPass)); } -void VulkanExampleBase::getEnabledFeatures() -{ - // Can be overriden in derived class -} +void VulkanExampleBase::getEnabledFeatures() {} void VulkanExampleBase::windowResize() { @@ -2205,10 +2202,7 @@ void VulkanExampleBase::handleMouseMove(int32_t x, int32_t y) mousePos = glm::vec2((float)x, (float)y); } -void VulkanExampleBase::windowResized() -{ - // Can be overriden in derived class -} +void VulkanExampleBase::windowResized() {} void VulkanExampleBase::initSwapchain() { diff --git a/base/vulkanexamplebase.h b/base/vulkanexamplebase.h index 42e241bb..94840abd 100644 --- a/base/vulkanexamplebase.h +++ b/base/vulkanexamplebase.h @@ -84,7 +84,7 @@ protected: std::chrono::time_point lastTimestamp; // Vulkan instance, stores all per-application states VkInstance instance; - // Physical device (GPU) that Vulkan will ise + // Physical device (GPU) that Vulkan will use VkPhysicalDevice physicalDevice; // Stores physical device properties (for e.g. checking device limits) VkPhysicalDeviceProperties deviceProperties; @@ -314,7 +314,7 @@ public: virtual void mouseMoved(double x, double y, bool &handled); /** @brief (Virtual) Called when the window has been resized, can be used by the sample application to recreate resources */ virtual void windowResized(); - /** @brief (Virtual) Called when resources have been recreated that require a rebuild of the command buffers (e.g. frame buffer), to be implemente by the sample application */ + /** @brief (Virtual) Called when resources have been recreated that require a rebuild of the command buffers (e.g. frame buffer), to be implemented by the sample application */ virtual void buildCommandBuffers(); /** @brief (Virtual) Setup default depth and stencil views */ virtual void setupDepthStencil(); @@ -337,7 +337,7 @@ public: /** @brief Adds the drawing commands for the ImGui overlay to the given command buffer */ void drawUI(const VkCommandBuffer commandBuffer); - /** Prepare the next frame for workload sumbission by acquiring the next swap chain image */ + /** Prepare the next frame for workload submission by acquiring the next swap chain image */ void prepareFrame(); /** @brief Presents the current image to the swap chain */ void submitFrame();