diff --git a/include/vkcv/Buffer.hpp b/include/vkcv/Buffer.hpp index 13a6b24d73048f5ac7f3879346d8abef7c97791d..f4c57c1e00b5ec46090030aa87d250e5248cd499 100644 --- a/include/vkcv/Buffer.hpp +++ b/include/vkcv/Buffer.hpp @@ -1,15 +1,15 @@ #pragma once /** - * @authors Lars Hoerttrich, Tobias Frisch + * @authors Tobias Frisch, Lars Hoerttrich, Alexander Gauggel * @file vkcv/Buffer.hpp * @brief Template buffer class for type security with buffers. */ - -#include "Handles.hpp" -#include "BufferManager.hpp" #include <vector> +#include "Handles.hpp" +#include "BufferManager.hpp" + namespace vkcv { template<typename T> diff --git a/include/vkcv/BufferManager.hpp b/include/vkcv/BufferManager.hpp index 42ed18e33b1d74bf16c4ceb8335753f52ee4c6c0..6ef6b52159be3521aba4439ad2ae49ea2124fe87 100644 --- a/include/vkcv/BufferManager.hpp +++ b/include/vkcv/BufferManager.hpp @@ -1,4 +1,9 @@ #pragma once +/** + * @authors Tobias Frisch, Alexander Gauggel, Artur Wasmut, Lars Hoerttrich, Sebastian Gaida + * @file vkcv/BufferManager.hpp + * @brief Manager to handle buffer operations. + */ #include <vector> #include <vulkan/vulkan.hpp> diff --git a/include/vkcv/CommandRecordingFunctionTypes.hpp b/include/vkcv/CommandRecordingFunctionTypes.hpp index c236fb2c717afd2a3bafc4b3a22708cdac942ffe..702e4a65c21e58a0e7748a9b8d74faaeac965c7d 100644 --- a/include/vkcv/CommandRecordingFunctionTypes.hpp +++ b/include/vkcv/CommandRecordingFunctionTypes.hpp @@ -1,8 +1,17 @@ #pragma once -#include "vkcv/Event.hpp" +/** + * @authors Alexander Gauggel, Tobias Frisch + * @file vkcv/CommandRecordingFunctionTypes.hpp + * @brief Abstract function types to handle command recording. + */ + #include <vulkan/vulkan.hpp> +#include "Event.hpp" + namespace vkcv { + typedef typename event_function<const vk::CommandBuffer&>::type RecordCommandFunction; typedef typename event_function<>::type FinishCommandFunction; + } \ No newline at end of file diff --git a/include/vkcv/CommandResources.hpp b/include/vkcv/CommandResources.hpp index 45041ddd11de79523c91488b1561662e17075844..a5bdf7ac40c918c113f676ab4881db0daf73858f 100644 --- a/include/vkcv/CommandResources.hpp +++ b/include/vkcv/CommandResources.hpp @@ -1,9 +1,17 @@ #pragma once +/** + * @authors Alexander Gauggel, Tobias Frisch + * @file vkcv/CommandResources.hpp + * @brief Support functions to deal with command resources. + */ + #include <vulkan/vulkan.hpp> #include <unordered_set> -#include "vkcv/QueueManager.hpp" + +#include "QueueManager.hpp" namespace vkcv { + struct CommandResources { std::vector<vk::CommandPool> cmdPoolPerQueueFamily; }; @@ -22,4 +30,5 @@ namespace vkcv { vk::Fence fence, const std::vector<vk::Semaphore>& waitSemaphores, const std::vector<vk::Semaphore>& signalSemaphores); + } \ No newline at end of file diff --git a/include/vkcv/ComputePipelineConfig.hpp b/include/vkcv/ComputePipelineConfig.hpp index a99d75e6a0e4ec332588e7ff48a7d1ca112eccb4..38e9e6da5db7dc42f4acd408d961f87183f8a1cc 100644 --- a/include/vkcv/ComputePipelineConfig.hpp +++ b/include/vkcv/ComputePipelineConfig.hpp @@ -1,17 +1,19 @@ #pragma once /** - * @authors Mark Mints - * @file src/vkcv/ComputePipelineConfig.hpp - * @brief Compute Pipeline Config Struct to hand over required information to Pipeline Creation. + * @authors Mark Mints, Tobias Frisch + * @file vkcv/ComputePipelineConfig.hpp + * @brief Compute pipeline config struct to hand over required information to pipeline creation. */ #include <vector> + #include "ShaderProgram.hpp" -namespace vkcv -{ +namespace vkcv { + struct ComputePipelineConfig { ShaderProgram& m_ShaderProgram; std::vector<vk::DescriptorSetLayout> m_DescriptorSetLayouts; }; + } \ No newline at end of file diff --git a/include/vkcv/Context.hpp b/include/vkcv/Context.hpp index 1160857cb2cdbbb0815390ff1f8405dda0f83796..962289582ca4e6c29929670b467ff3d7a136db39 100644 --- a/include/vkcv/Context.hpp +++ b/include/vkcv/Context.hpp @@ -1,4 +1,9 @@ #pragma once +/** + * @authors Tobias Frisch, Artur Wasmut, Sebastian Gaida, Alexander Gauggel + * @file vkcv/Context.hpp + * @brief Class to handle the instance, device, allocator and features of the current context. + */ #include <vulkan/vulkan.hpp> #include <vk_mem_alloc.hpp> diff --git a/include/vkcv/Core.hpp b/include/vkcv/Core.hpp index 465a78440911ef63adade1f5a54651324682c4e5..228513227e42d7c4073a988d522b0fd8da463423 100644 --- a/include/vkcv/Core.hpp +++ b/include/vkcv/Core.hpp @@ -1,7 +1,9 @@ #pragma once /** - * @file src/vkcv/Core.hpp - * @brief Handling of global states regarding dependencies + * @authors Alexander Gauggel, Tobias Frisch, Sebastian Gaida, Artur Wasmut, Lars Hoerttrich, + * Mara Vogt, Mark Mints, Simeon Hermann, Alex Laptop, Katharina Krämer, Vanessa Karolek + * @file vkcv/Core.hpp + * @brief Handling of global states regarding dependencies. */ #include <memory> diff --git a/include/vkcv/DescriptorConfig.hpp b/include/vkcv/DescriptorConfig.hpp index becdb9f843aa254fed6f05dec0c18686fac497d6..a557c4531a753cdf5c57168604de63d76b6e7876 100644 --- a/include/vkcv/DescriptorConfig.hpp +++ b/include/vkcv/DescriptorConfig.hpp @@ -1,10 +1,15 @@ #pragma once +/** + * @authors Artur Wasmut, Tobias Frisch, Simeon Hermann, Alexander Gauggel, Vanessa Karolek + * @file vkcv/DescriptorConfig.hpp + * @brief Structures to handle descriptor types and bindings. + */ #include <unordered_map> -#include "vkcv/Handles.hpp" -#include "vkcv/ShaderStage.hpp" -#include "vkcv/Logger.hpp" +#include "Handles.hpp" +#include "ShaderStage.hpp" +#include "Logger.hpp" namespace vkcv { diff --git a/include/vkcv/DescriptorWrites.hpp b/include/vkcv/DescriptorWrites.hpp index f4f9729a193c9da4cfc4ccc869337314e8a71ccb..a055e86ffa08a18336efc92a4316fc3c4bdfc41c 100644 --- a/include/vkcv/DescriptorWrites.hpp +++ b/include/vkcv/DescriptorWrites.hpp @@ -1,8 +1,16 @@ #pragma once -#include "Handles.hpp" +/** + * @authors Artur Wasmut, Tobias Frisch, Alexander Gauggel, Vanessa Karolek + * @file vkcv/DescriptorWrites.hpp + * @brief Structures to handle descriptor writes. + */ + #include <vector> +#include "Handles.hpp" + namespace vkcv { + struct SampledImageDescriptorWrite { inline SampledImageDescriptorWrite(uint32_t binding, ImageHandle image, uint32_t mipLevel = 0, bool useGeneralLayout = false, uint32_t arrayIndex = 0) : binding(binding), image(image), mipLevel(mipLevel), useGeneralLayout(useGeneralLayout), arrayIndex(arrayIndex) {}; @@ -54,4 +62,5 @@ namespace vkcv { std::vector<SamplerDescriptorWrite> samplerWrites; std::vector<AccelerationDescriptorWrite> accelerationWrites; }; + } \ No newline at end of file diff --git a/include/vkcv/DrawcallRecording.hpp b/include/vkcv/DrawcallRecording.hpp index 77e2a2e13bee3248e424d1d9c3d4cad7aaecd34b..1bd90354b8fb2a775c791c4866bcc51362a63af1 100644 --- a/include/vkcv/DrawcallRecording.hpp +++ b/include/vkcv/DrawcallRecording.hpp @@ -1,11 +1,19 @@ #pragma once +/** + * @authors Sebastian Gaida, Alexander Gauggel, Artur Wasmut, Tobias Frisch + * @file vkcv/DrawcallRecording.hpp + * @brief Structures and functions to record drawcalls. + */ + #include <vulkan/vulkan.hpp> -#include <vkcv/Handles.hpp> -#include <vkcv/DescriptorConfig.hpp> -#include <vkcv/PushConstants.hpp> + +#include "Handles.hpp" +#include "DescriptorConfig.hpp" +#include "PushConstants.hpp" #include "Buffer.hpp" namespace vkcv { + struct VertexBufferBinding { inline VertexBufferBinding(vk::DeviceSize offset, vk::Buffer buffer) noexcept : offset(offset), buffer(buffer) {} @@ -95,4 +103,5 @@ namespace vkcv { const uint32_t pushConstantOffset, const MeshShaderDrawcall& drawcall, const uint32_t firstTask); + } diff --git a/include/vkcv/Event.hpp b/include/vkcv/Event.hpp index 0d30a4ac5f47132c3671656d2f3462917f49a90e..b7cc18867032c17fb50bad16b4c37ec096f06cb5 100644 --- a/include/vkcv/Event.hpp +++ b/include/vkcv/Event.hpp @@ -1,6 +1,6 @@ #pragma once /** - * @authors Tobias Frisch + * @authors Tobias Frisch, Sebastian Gaida, Josch Morgenstern, Katharina Krämer * @file vkcv/Event.hpp * @brief Template event struct to synchronize callbacks. */ @@ -141,5 +141,7 @@ namespace vkcv { event &operator=(const event &other) = delete; event &operator=(event &&other) = delete; + }; + } diff --git a/include/vkcv/FeatureManager.hpp b/include/vkcv/FeatureManager.hpp index b4d690bc855ca5ce80ddd8e2735513e48422efca..136972fda74c0db835fbf43ebb6f4a3db7ab3a0c 100644 --- a/include/vkcv/FeatureManager.hpp +++ b/include/vkcv/FeatureManager.hpp @@ -1,12 +1,17 @@ #pragma once - -#include "Logger.hpp" +/** + * @authors Tobias Frisch, Artur Wasmut, Vanessa Karolek, Sebastian Gaida + * @file vkcv/FeatureManager.hpp + * @brief Class to manage feature support and extension usage. + */ #include <functional> #include <unordered_set> #include <vector> #include <vulkan/vulkan.hpp> +#include "Logger.hpp" + namespace vkcv { /** diff --git a/include/vkcv/GraphicsPipelineConfig.hpp b/include/vkcv/GraphicsPipelineConfig.hpp index 6d466c4aa3893049eb0b3e770c2e4dde6b6199e3..a9f0996b3e8e64d4922a09af930ef6ab093e70c6 100644 --- a/include/vkcv/GraphicsPipelineConfig.hpp +++ b/include/vkcv/GraphicsPipelineConfig.hpp @@ -1,12 +1,13 @@ #pragma once /** - * @authors Mara Vogt, Mark Mints - * @file src/vkcv/PipelineConfig.hpp + * @authors Mara Vogt, Mark Mints, Tobias Frisch + * @file vkcv/GraphicsPipelineConfig.hpp * @brief Graphics Pipeline Config Struct to hand over required information to Pipeline Creation */ #include <vector> #include <cstdint> + #include "Handles.hpp" #include "ShaderProgram.hpp" #include "VertexLayout.hpp" diff --git a/include/vkcv/Handles.hpp b/include/vkcv/Handles.hpp index 802b559b9d369a850645fe4e48ba333807e6b210..40383aea94661c65da29abcdbc39d738c957ed6f 100644 --- a/include/vkcv/Handles.hpp +++ b/include/vkcv/Handles.hpp @@ -1,6 +1,6 @@ #pragma once /** - * @authors Artur Wasmut, Tobias Frisch + * @authors Tobias Frisch, Alexander Gauggel, Artur Wasmut, Sebastian Gaida, Mark Mints * @file vkcv/Handles.hpp * @brief Central header file for all possible handles that the framework will hand out. */ diff --git a/include/vkcv/Image.hpp b/include/vkcv/Image.hpp index cac4a4664fb47267c0fcc5959df91ff2d922898b..8752a9b38aaf70a889c62a7386307d1dbe1f5dad 100644 --- a/include/vkcv/Image.hpp +++ b/include/vkcv/Image.hpp @@ -1,14 +1,14 @@ #pragma once /** - * @authors Lars Hoerttrich + * @authors Alexander Gauggel, Tobias Frisch, Lars Hoerttrich, Artur Wasmut * @file vkcv/Image.hpp - * @brief Class for image handling + * @brief Class for image handling. */ -#include "vulkan/vulkan.hpp" +#include <vulkan/vulkan.hpp> #include "Handles.hpp" -#include "vkcv/ImageConfig.hpp" +#include "ImageConfig.hpp" namespace vkcv { diff --git a/include/vkcv/ImageConfig.hpp b/include/vkcv/ImageConfig.hpp index 2e413b97be92ae771ef85342981ea0163a93ab52..7f267c3e947bdd9758ac9e60e5c16741fbfa831a 100644 --- a/include/vkcv/ImageConfig.hpp +++ b/include/vkcv/ImageConfig.hpp @@ -1,9 +1,17 @@ #pragma once +/** + * @authors Alexander Gauggel, Tobias Frisch + * @file vkcv/ImageConfig.hpp + * @brief File to provide functions supporting the use of multisampling. + */ + #include <vulkan/vulkan.hpp> namespace vkcv { + enum class Multisampling { None, MSAA2X, MSAA4X, MSAA8X }; vk::SampleCountFlagBits msaaToVkSampleCountFlag(Multisampling msaa); uint32_t msaaToSampleCount(Multisampling msaa); + } diff --git a/include/vkcv/Logger.hpp b/include/vkcv/Logger.hpp index 4ae2f7b9d62ca80bfad3463707866472807e84f7..28f01b2c0accbabbb1caff84c47ef9c0deeadaf7 100644 --- a/include/vkcv/Logger.hpp +++ b/include/vkcv/Logger.hpp @@ -5,7 +5,7 @@ * @brief Logging macro function to print line of code specific information. */ -#include <stdio.h> +#include <cstdio> namespace vkcv { diff --git a/include/vkcv/PassConfig.hpp b/include/vkcv/PassConfig.hpp index f3b2b802d062a441dfb0c810154205effb7053a2..7ddb01a2adb7fdc1067baebda10cafd268733363 100644 --- a/include/vkcv/PassConfig.hpp +++ b/include/vkcv/PassConfig.hpp @@ -1,11 +1,18 @@ #pragma once +/** + * @authors Alexander Gauggel, Artur Wasmut, Tobias Frisch + * @file vkcv/PassConfig.hpp + * @brief Enums and structures to handle render pass configuration. + */ #include <vector> #include <vulkan/vulkan.hpp> + #include "ImageConfig.hpp" namespace vkcv { + enum class AttachmentLayout { UNDEFINED, @@ -50,4 +57,5 @@ namespace vkcv std::vector<AttachmentDescription> attachments{}; Multisampling msaa; }; + } \ No newline at end of file diff --git a/include/vkcv/PushConstants.hpp b/include/vkcv/PushConstants.hpp index 986de5525a348894434ea79312bacc3c8f7429fe..83968d4fc518e90d301fbc72372164d54aafa8c1 100644 --- a/include/vkcv/PushConstants.hpp +++ b/include/vkcv/PushConstants.hpp @@ -1,4 +1,9 @@ #pragma once +/** + * @authors Tobias Frisch, Alexander Gauggel + * @file vkcv/PushConstants.hpp + * @brief Class to manage push constants for pipeline recording. + */ #include <vector> #include <vulkan/vulkan.hpp> diff --git a/include/vkcv/QueueManager.hpp b/include/vkcv/QueueManager.hpp index 3e302495d166d260d20ba21493c44be6795724c3..f05a1007b11562102e746dd71b07358c3ae21ee1 100644 --- a/include/vkcv/QueueManager.hpp +++ b/include/vkcv/QueueManager.hpp @@ -1,6 +1,6 @@ #pragma once /** - * @authors Tobias Frisch + * @authors Sebastian Gaida, Tobias Frisch, Alexander Gauggel * @file vkcv/QueueManager.hpp * @brief Types to manage queues of a device. */ diff --git a/include/vkcv/Result.hpp b/include/vkcv/Result.hpp index b78e444de9040f2982122d9242f584c7f9c340cf..f9d8a1802e0c26e83fb3641a8e7e12969106c156 100644 --- a/include/vkcv/Result.hpp +++ b/include/vkcv/Result.hpp @@ -1,12 +1,15 @@ #pragma once +/** + * @authors Tobias Frisch + * @file vkcv/Result.hpp + * @brief Enum to represent result values of function which can fail. + */ namespace vkcv { enum class Result { - SUCCESS = 0, ERROR = 1 - }; } diff --git a/include/vkcv/Sampler.hpp b/include/vkcv/Sampler.hpp index 007ed5ae4737275ddacbc5881a2c4c202b8806a4..ad2ba8bd6c4769c1d882d940dbde323ef6623365 100644 --- a/include/vkcv/Sampler.hpp +++ b/include/vkcv/Sampler.hpp @@ -1,4 +1,9 @@ #pragma once +/** + * @authors Tobias Frisch + * @file vkcv/Sampler.hpp + * @brief Enums for different sampler attributes. + */ namespace vkcv { diff --git a/include/vkcv/ShaderProgram.hpp b/include/vkcv/ShaderProgram.hpp index d39f0da436089830fc90e5178b056d0be2cae910..92ab636fa1f69f0df4d6ba1351243fbf80ddd8b8 100644 --- a/include/vkcv/ShaderProgram.hpp +++ b/include/vkcv/ShaderProgram.hpp @@ -1,8 +1,8 @@ #pragma once /** - * @authors Simeon Hermann, Leonie Franken - * @file src/vkcv/ShaderProgram.hpp - * @brief ShaderProgram class to handle and prepare the shader stages for a graphics pipeline + * @authors Artur Wasmut, Leonie Franken, Tobias Frisch, Simeon Hermann, Alexander Gauggel, Mark Mints + * @file vkcv/ShaderProgram.hpp + * @brief ShaderProgram class to handle and prepare the shader stages for a graphics pipeline. */ #include <unordered_map> @@ -12,6 +12,7 @@ #include <filesystem> #include <vulkan/vulkan.hpp> #include <spirv_cross.hpp> + #include "VertexLayout.hpp" #include "DescriptorConfig.hpp" #include "ShaderStage.hpp" diff --git a/include/vkcv/ShaderStage.hpp b/include/vkcv/ShaderStage.hpp index 0baaaf5b57fcc510159b8620e3119e4749467093..83446bd0717cd6beaa010aca4673c44f0e294d7d 100644 --- a/include/vkcv/ShaderStage.hpp +++ b/include/vkcv/ShaderStage.hpp @@ -1,4 +1,9 @@ #pragma once +/** + * @authors Artur Wasmut, Simeon Hermann, Tobias Frisch, Vanessa Karolek, Alexander Gauggel, Lars Hoerttrich + * @file vkcv/ShaderStage.hpp + * @brief Enum and struct to operate with multiple shader stages. + */ #include <vulkan/vulkan.hpp> @@ -42,4 +47,5 @@ namespace vkcv { constexpr ShaderStages operator~(ShaderStage stage) noexcept { return ~(ShaderStages(stage)); } + } diff --git a/include/vkcv/Swapchain.hpp b/include/vkcv/Swapchain.hpp index f1a29faa7534b89a17d7b1a0dcc4d58a05967bbf..dc23bb9bf93c4c1733cb67944575b9fa669cb5c0 100644 --- a/include/vkcv/Swapchain.hpp +++ b/include/vkcv/Swapchain.hpp @@ -1,9 +1,15 @@ #pragma once -#include "vulkan/vulkan.hpp" -#include "Context.hpp" -#include "vkcv/Window.hpp" +/** + * @authors Sebastian Gaida, Tobias Frisch + * @file vkcv/Swapchain.hpp + * @brief Class to manage the state of a swapchain and its transitions. + */ #include <atomic> +#include <vulkan/vulkan.hpp> + +#include "Context.hpp" +#include "Window.hpp" namespace vkcv { diff --git a/include/vkcv/SyncResources.hpp b/include/vkcv/SyncResources.hpp index c41019cc46ee1375a83323a6ecc877ecc1c1727a..ea421dd4d3503e5553add124d57113f50705cc80 100644 --- a/include/vkcv/SyncResources.hpp +++ b/include/vkcv/SyncResources.hpp @@ -1,7 +1,14 @@ #pragma once +/** + * @authors Alexander Gauggel, Tobias Frisch + * @file vkcv/SyncResources.hpp + * @brief Support functions to deal with synchronization resources. + */ + #include <vulkan/vulkan.hpp> namespace vkcv { + struct SyncResources { vk::Semaphore renderFinished; vk::Semaphore swapchainImageAcquired; @@ -11,5 +18,6 @@ namespace vkcv { SyncResources createSyncResources(const vk::Device &device); void destroySyncResources(const vk::Device &device, const SyncResources &resources); vk::Fence createFence(const vk::Device &device); - void waitForFence(const vk::Device& device, const vk::Fence fence); + void waitForFence(const vk::Device& device, const vk::Fence& fence); + } \ No newline at end of file diff --git a/include/vkcv/VertexLayout.hpp b/include/vkcv/VertexLayout.hpp index 0600b99a24a327605e89b2e8ec304c20dbf7ad2e..588e898e89925afe52f60fda705cddff8ce5a6bd 100644 --- a/include/vkcv/VertexLayout.hpp +++ b/include/vkcv/VertexLayout.hpp @@ -1,10 +1,17 @@ #pragma once +/** + * @authors Alexander Gauggel, Artur Wasmut, Mara Vogt, Susanne Dötsch, + * Trevor Hollmann, Leonie Franken, Simeon Hermann, Tobias Frisch + * @file vkcv/VertexLayout.hpp + * @brief Structures to handle vertex layout, bindings and attachments. + */ #include <vector> #include <iostream> #include <string> -namespace vkcv{ +namespace vkcv { + enum class VertexAttachmentFormat{ FLOAT, FLOAT2, @@ -63,4 +70,5 @@ namespace vkcv{ std::vector<VertexBinding> vertexBindings; }; + } diff --git a/include/vkcv/Window.hpp b/include/vkcv/Window.hpp index cef735632689cdd119b694674e9ac7af67471a3c..7b7c33425cd69842d495fa94eb2a202fca0f3228 100644 --- a/include/vkcv/Window.hpp +++ b/include/vkcv/Window.hpp @@ -1,4 +1,9 @@ #pragma once +/** + * @authors Tobias Frisch, Sebastian Gaida, Vanessa Karolek, Artur Wasmut + * @file vkcv/Window.hpp + * @brief Class to represent and manage a window with its input. + */ #define NOMINMAX #include <algorithm> diff --git a/modules/asset_loader/src/vkcv/asset/asset_loader.cpp b/modules/asset_loader/src/vkcv/asset/asset_loader.cpp index 2ca35bdab791ea18a67f33e53ab17fc485cbad02..f3f55f6514a58e776abf226fd80805fbf656a809 100644 --- a/modules/asset_loader/src/vkcv/asset/asset_loader.cpp +++ b/modules/asset_loader/src/vkcv/asset/asset_loader.cpp @@ -1,8 +1,8 @@ #include "vkcv/asset/asset_loader.hpp" #include <iostream> -#include <string.h> // memcpy(3) +#include <cstring> // memcpy(3) #include <set> -#include <stdlib.h> // calloc(3) +#include <cstdlib> // calloc(3) #include <vulkan/vulkan.hpp> #include <fx/gltf.h> #include <stb_image.h> diff --git a/modules/camera/src/vkcv/camera/Camera.cpp b/modules/camera/src/vkcv/camera/Camera.cpp index 25b2a7339a46de8ced171c8ee9c10f962c3c0399..4b3ae9274733a070463f553bd79183789d0701b6 100644 --- a/modules/camera/src/vkcv/camera/Camera.cpp +++ b/modules/camera/src/vkcv/camera/Camera.cpp @@ -1,6 +1,6 @@ #include "vkcv/camera/Camera.hpp" -#include <math.h> +#include <cmath> namespace vkcv::camera { diff --git a/modules/upscaling/src/vkcv/upscaling/FSRUpscaling.cpp b/modules/upscaling/src/vkcv/upscaling/FSRUpscaling.cpp index f7cf0b4a1e68e46a784723d13366deac899f9963..eef49ef8d1617239a362f2790e69e8f358883bc1 100644 --- a/modules/upscaling/src/vkcv/upscaling/FSRUpscaling.cpp +++ b/modules/upscaling/src/vkcv/upscaling/FSRUpscaling.cpp @@ -1,7 +1,7 @@ #include "vkcv/upscaling/FSRUpscaling.hpp" -#include <stdint.h> -#include <math.h> +#include <cstdint> +#include <cmath> #define A_CPU 1 #include <ffx_a.h> diff --git a/projects/saf_r/src/main.cpp b/projects/saf_r/src/main.cpp index 354ea7a6c97b37b88ff7b484b13d878f09ae4d0f..c206fbffed7c9f5295fa0d5387ec5bfc9185d34a 100644 --- a/projects/saf_r/src/main.cpp +++ b/projects/saf_r/src/main.cpp @@ -5,10 +5,9 @@ #include <vkcv/asset/asset_loader.hpp> #include <vkcv/shader/GLSLCompiler.hpp> #include <chrono> -#include <limits> #include <cmath> #include <vector> -#include <string.h> // memcpy(3) +#include <cstring> #include "safrScene.hpp" diff --git a/projects/saf_r/src/safrScene.hpp b/projects/saf_r/src/safrScene.hpp index 33a298f82121971021d1912e6c1205e9c48a49f0..fc149a7b6ba11fd832cf7ec1040d57c401bab87a 100644 --- a/projects/saf_r/src/safrScene.hpp +++ b/projects/saf_r/src/safrScene.hpp @@ -28,7 +28,7 @@ public: */ struct Material { Material(const glm::vec4& a, const glm::vec3& color, const float& spec, const float& r) : albedo(a), diffuse_color(color), specular_exponent(spec), refractive_index(r) {} - Material() : refractive_index(1), albedo(1, 0, 0, 0), diffuse_color(), specular_exponent() {} + Material() : albedo(1, 0, 0, 0), diffuse_color(), specular_exponent(), refractive_index(1) {} glm::vec4 albedo; alignas(16) glm::vec3 diffuse_color; float specular_exponent; diff --git a/projects/sph/src/main.cpp b/projects/sph/src/main.cpp index b2971fed79a7e601dffc4d53047a36e6052fdd19..738d7699b4bcfa34ce70ca19864a3eb9724c7e27 100644 --- a/projects/sph/src/main.cpp +++ b/projects/sph/src/main.cpp @@ -3,7 +3,7 @@ #include <vkcv/camera/CameraManager.hpp> #include <chrono> #include <random> -#include <time.h> +#include <ctime> #include <vkcv/shader/GLSLCompiler.hpp> #include "BloomAndFlares.hpp" #include "PipelineInit.hpp" diff --git a/src/vkcv/FeatureManager.cpp b/src/vkcv/FeatureManager.cpp index c25745fcdd007df86316e0f72bc3d654377baa70..4aefcb90131b5f9d6144d1f870b6fe709cd6c1e7 100644 --- a/src/vkcv/FeatureManager.cpp +++ b/src/vkcv/FeatureManager.cpp @@ -1,9 +1,12 @@ #include "vkcv/FeatureManager.hpp" -#include <stddef.h> -#include <string.h> +#include <cstddef> +#include <cstring> + +#ifdef _MSVC_LANG #include <type_traits> +#endif namespace vkcv { diff --git a/src/vkcv/File.cpp b/src/vkcv/File.cpp index 6006b90f74e0a41f83483f2a1efbe5bda4c4e9f8..871dc06611903d5fb5cc8a9e3d53233510125826 100644 --- a/src/vkcv/File.cpp +++ b/src/vkcv/File.cpp @@ -1,7 +1,7 @@ #include "vkcv/File.hpp" -#include <stdlib.h> +#include <cstdlib> #ifdef _WIN32 #include <io.h> diff --git a/src/vkcv/SyncResources.cpp b/src/vkcv/SyncResources.cpp index 9c27fe32452e0ae648565020d92891764ececb3f..8bd53c85e8cdede55d5b1db71d44bf483e24acb1 100644 --- a/src/vkcv/SyncResources.cpp +++ b/src/vkcv/SyncResources.cpp @@ -26,7 +26,7 @@ namespace vkcv { return device.createFence(fenceInfo, nullptr, {}); } - void waitForFence(const vk::Device& device, const vk::Fence fence) { + void waitForFence(const vk::Device& device, const vk::Fence& fence) { const auto result = device.waitForFences(fence, true, UINT64_MAX); assert(result == vk::Result::eSuccess); }