diff --git a/modules/asset_loader/include/vkcv/asset/asset_loader.hpp b/modules/asset_loader/include/vkcv/asset/asset_loader.hpp index 25d7d5b36d00bad8587fbe082f8ebd041d84fde6..2362e560516fee3bf392ef150a756a25aa2420a0 100644 --- a/modules/asset_loader/include/vkcv/asset/asset_loader.hpp +++ b/modules/asset_loader/include/vkcv/asset/asset_loader.hpp @@ -36,6 +36,12 @@ namespace vkcv::asset { +/** + * @defgroup vkcv_asset Asset Loader Module + * A module to load assets like scenes, meshes and textures. + * @{ + */ + /** * These return codes are limited to the asset loader module. If unified return * codes are defined for the vkcv framework, these will be used instead. @@ -321,4 +327,6 @@ int loadScene(const std::filesystem::path &path, Scene &scene); */ Texture loadTexture(const std::filesystem::path& path); +/** @} */ + } // end namespace vkcv::asset diff --git a/modules/camera/include/vkcv/camera/Camera.hpp b/modules/camera/include/vkcv/camera/Camera.hpp index 8a8c5df5d74cf1402bd8810172657ba77ddb2d56..44851c108c9070aa4b37c936bbd644b475cf0b12 100644 --- a/modules/camera/include/vkcv/camera/Camera.hpp +++ b/modules/camera/include/vkcv/camera/Camera.hpp @@ -8,6 +8,12 @@ namespace vkcv::camera { + /** + * @defgroup vkcv_camera Camera Module + * A module to manage intrinsic and extrinsic parameters with camera instances. + * @{ + */ + /** * @brief Used to create a camera which governs the view and projection matrices. */ @@ -207,4 +213,6 @@ namespace vkcv::camera { void setUp(const glm::vec3 &up); }; + /** @} */ + } diff --git a/modules/camera/include/vkcv/camera/CameraController.hpp b/modules/camera/include/vkcv/camera/CameraController.hpp index 90fc97401851851194ec89a10757bbfb1453990d..6d4d020960c300c7b79523e76a0fdb35588dafcb 100644 --- a/modules/camera/include/vkcv/camera/CameraController.hpp +++ b/modules/camera/include/vkcv/camera/CameraController.hpp @@ -5,6 +5,11 @@ namespace vkcv::camera { + /** + * @addtogroup vkcv_camera + * @{ + */ + /** * @brief Used as a base class for defining camera controller classes with different behaviors, e.g. the * #PilotCameraController. @@ -69,4 +74,6 @@ namespace vkcv::camera { virtual void gamepadCallback(int gamepadIndex, Camera &camera, double frametime) = 0; }; + /** @} */ + } \ No newline at end of file diff --git a/modules/camera/include/vkcv/camera/CameraManager.hpp b/modules/camera/include/vkcv/camera/CameraManager.hpp index 409f9196599be02e4215f3924c1102f0b8c72899..9591aa357903f4dc69d5407cfad51899764a7e02 100644 --- a/modules/camera/include/vkcv/camera/CameraManager.hpp +++ b/modules/camera/include/vkcv/camera/CameraManager.hpp @@ -9,6 +9,11 @@ namespace vkcv::camera { + /** + * @addtogroup vkcv_camera + * @{ + */ + /** * @brief Used for specifying existing types of camera controllers when adding a new controller object to the * #CameraManager. @@ -192,4 +197,7 @@ namespace vkcv::camera { */ void update(double deltaTime); }; + + /** @} */ + } diff --git a/modules/camera/include/vkcv/camera/PilotCameraController.hpp b/modules/camera/include/vkcv/camera/PilotCameraController.hpp index 67388818a59b66775598e9d4257fa4c36646332a..0596b7763892046e18e09eebbceb6a19dd6cb43b 100644 --- a/modules/camera/include/vkcv/camera/PilotCameraController.hpp +++ b/modules/camera/include/vkcv/camera/PilotCameraController.hpp @@ -4,6 +4,11 @@ namespace vkcv::camera { + /** + * @addtogroup vkcv_camera + * @{ + */ + /** * @brief Used to move around a camera object in world space. */ @@ -111,4 +116,6 @@ namespace vkcv::camera { void gamepadCallback(int gamepadIndex, Camera &camera, double frametime); }; + /** @} */ + } \ No newline at end of file diff --git a/modules/camera/include/vkcv/camera/TrackballCameraController.hpp b/modules/camera/include/vkcv/camera/TrackballCameraController.hpp index 20336f7a10644c73e451c5106f37545e84eb27f7..13f7fefa76b0c4e5823845d5fd90f4cd62e5c5f9 100644 --- a/modules/camera/include/vkcv/camera/TrackballCameraController.hpp +++ b/modules/camera/include/vkcv/camera/TrackballCameraController.hpp @@ -4,6 +4,11 @@ namespace vkcv::camera { + /** + * @addtogroup vkcv_camera + * @{ + */ + /** * @brief Used to orbit a camera around its center point. */ @@ -106,4 +111,6 @@ namespace vkcv::camera { void gamepadCallback(int gamepadIndex, Camera &camera, double frametime); }; + /** @} */ + } \ No newline at end of file diff --git a/modules/gui/include/vkcv/gui/GUI.hpp b/modules/gui/include/vkcv/gui/GUI.hpp index 8826cdbac057e39f2655844bfe9a252da43a4596..9a85e6413d133677a4ba0528d930b2f54a363a94 100644 --- a/modules/gui/include/vkcv/gui/GUI.hpp +++ b/modules/gui/include/vkcv/gui/GUI.hpp @@ -9,29 +9,73 @@ namespace vkcv::gui { + /** + * @defgroup vkcv_gui GUI Module + * A module to manage ImGUI integration for VkCV applications. + * @{ + */ + + /** + * Class to manage ImGui integration for VkCV. + */ class GUI final { private: + /** + * Window handle of the currently used window to draw user interface on. + */ WindowHandle m_windowHandle; + + /** + * Reference to the current Core instance. + */ Core& m_core; - + + /** + * Reference to the current Context instance. + */ const Context& m_context; - + + /** + * ImGui context for drawing GUI. + */ ImGuiContext* m_gui_context; - + + /** + * Vulkan handle for the ImGui descriptor pool. + */ vk::DescriptorPool m_descriptor_pool; + + /** + * Vulkan handle for the ImGui render pass. + */ vk::RenderPass m_render_pass; - + + /** + * Event handle for pressing a mouse button. + */ event_handle<int,int,int> f_mouseButton; + + /** + * Event handle for scrolling with the mouse or touchpad. + */ event_handle<double,double> f_mouseScroll; + + /** + * Event handle for pressing a key. + */ event_handle<int,int,int,int> f_key; + + /** + * Event handle for typing a character. + */ event_handle<unsigned int> f_char; public: /** - * Constructor of a new instance of ImGui management + * Constructor of a new instance for ImGui management. * - * @param core Valid #Core instance of the framework - * @param window Valid #Window instance of the framework + * @param[in,out] core Valid Core instance of the framework + * @param[in,out] window Valid Window instance of the framework */ GUI(Core& core, WindowHandle& windowHandle); @@ -42,12 +86,12 @@ namespace vkcv::gui { GUI& operator=(GUI&& other) = delete; /** - * Destructor of a #GUI instance + * Destructor of a GUI instance. */ virtual ~GUI(); /** - * Sets up a new frame for ImGui to draw + * Sets up a new frame for ImGui to draw. */ void beginGUI(); @@ -59,4 +103,6 @@ namespace vkcv::gui { }; + /** @} */ + } diff --git a/modules/material/include/vkcv/material/Material.hpp b/modules/material/include/vkcv/material/Material.hpp index 41ee8aecce98072981be80ccf9803c43c6464746..f03bd13ffa760b0184c1c73d8b330d00a5131aaa 100644 --- a/modules/material/include/vkcv/material/Material.hpp +++ b/modules/material/include/vkcv/material/Material.hpp @@ -6,13 +6,26 @@ #include <vkcv/Handles.hpp> namespace vkcv::material { - + + /** + * @defgroup vkcv_material Material Module + * A module to manage standardized materials for rendering. + * @{ + */ + + /** + * Enum to handle standardized material types. + */ enum class MaterialType { PBR_MATERIAL = 1, UNKNOWN = 0 }; - + + /** + * Class to manage required handles for materials using + * a wide range of textures with separate samplers and factors. + */ class Material { private: struct Texture { @@ -70,5 +83,7 @@ namespace vkcv::material { const float emissiveFactor [3]); }; + + /** @} */ } diff --git a/modules/meshlet/include/vkcv/meshlet/Forsyth.hpp b/modules/meshlet/include/vkcv/meshlet/Forsyth.hpp index 43dc9a3b6bb81ea915268de7a7b53b18efd27638..90625bd470ac4ecbc27f2e6f95ab9e18734557f8 100644 --- a/modules/meshlet/include/vkcv/meshlet/Forsyth.hpp +++ b/modules/meshlet/include/vkcv/meshlet/Forsyth.hpp @@ -4,15 +4,24 @@ namespace vkcv::meshlet { - /** - * Reorders the index buffer, simulating a LRU cache, so that vertices are grouped together in close triangle patches - * @param idxBuf current IndexBuffer - * @param vertexCount of the mesh - * @return new reordered index buffer to replace the input index buffer - * References: - * https://tomforsyth1000.github.io/papers/fast_vert_cache_opt.html - * https://www.martin.st/thesis/efficient_triangle_reordering.pdf - * https://github.com/vivkin/forsyth/blob/master/forsyth.h - */ - VertexCacheReorderResult forsythReorder(const std::vector<uint32_t> &idxBuf, const size_t vertexCount); + + /** + * @addtogroup vkcv_meshlet + * @{ + */ + + /** + * Reorders the index buffer, simulating a LRU cache, so that vertices are grouped together in close triangle patches + * @param idxBuf current IndexBuffer + * @param vertexCount of the mesh + * @return new reordered index buffer to replace the input index buffer + * References: + * https://tomforsyth1000.github.io/papers/fast_vert_cache_opt.html + * https://www.martin.st/thesis/efficient_triangle_reordering.pdf + * https://github.com/vivkin/forsyth/blob/master/forsyth.h + */ + VertexCacheReorderResult forsythReorder(const std::vector<uint32_t> &idxBuf, const size_t vertexCount); + + /** @} */ + } diff --git a/modules/meshlet/include/vkcv/meshlet/Meshlet.hpp b/modules/meshlet/include/vkcv/meshlet/Meshlet.hpp index 9900dffaf28c85753d367ba79bbdf5c19a2cf479..ee32878726123a8d51c3816c9df2644da4ae9b6c 100644 --- a/modules/meshlet/include/vkcv/meshlet/Meshlet.hpp +++ b/modules/meshlet/include/vkcv/meshlet/Meshlet.hpp @@ -7,6 +7,12 @@ namespace vkcv::meshlet { + /** + * @defgroup vkcv_meshlet Meshlet Module + * A module to convert meshes into meshlets for rendering via mesh shaders. + * @{ + */ + struct Vertex { glm::vec3 position; float padding0; @@ -56,4 +62,6 @@ namespace vkcv::meshlet { const std::vector<uint8_t>& indexData, vkcv::asset::IndexType indexType); + /** @} */ + } \ No newline at end of file diff --git a/modules/meshlet/include/vkcv/meshlet/Tipsify.hpp b/modules/meshlet/include/vkcv/meshlet/Tipsify.hpp index 6fb4b37d9c17c82642c3b5e7667c3e8acc50b8c0..3c808f9565ee1e73b14356dc0f4c8f4cd7c6dd9c 100644 --- a/modules/meshlet/include/vkcv/meshlet/Tipsify.hpp +++ b/modules/meshlet/include/vkcv/meshlet/Tipsify.hpp @@ -5,6 +5,12 @@ #include <iostream> namespace vkcv::meshlet { + + /** + * @addtogroup vkcv_meshlet + * @{ + */ + /** * reorders the IndexBuffer, so all usages of vertices to triangle are as close as possible * @param indexBuffer32Bit current IndexBuffer @@ -20,4 +26,7 @@ namespace vkcv::meshlet { */ VertexCacheReorderResult tipsifyMesh(const std::vector<uint32_t> &indexBuffer32Bit, const int vertexCount, const unsigned int cacheSize = 20); + + /** @} */ + } \ No newline at end of file diff --git a/modules/scene/include/vkcv/scene/Bounds.hpp b/modules/scene/include/vkcv/scene/Bounds.hpp index 07cdf88828d786982b0fe8e7919d543557794c42..e31970ff623c2ec2e354c2ba1a66970628584f3f 100644 --- a/modules/scene/include/vkcv/scene/Bounds.hpp +++ b/modules/scene/include/vkcv/scene/Bounds.hpp @@ -5,6 +5,11 @@ #include <glm/vec3.hpp> namespace vkcv::scene { + + /** + * @addtogroup vkcv_scene + * @{ + */ class Bounds { private: @@ -65,5 +70,7 @@ namespace vkcv::scene { }; std::ostream& operator << (std::ostream& out, const Bounds& bounds); + + /** @} */ } diff --git a/modules/scene/include/vkcv/scene/Frustum.hpp b/modules/scene/include/vkcv/scene/Frustum.hpp index de3917575a9aed32459e6403fab1d6d8fe131b0a..723eb0a855b1504e6047c15c5803a5029f517e25 100644 --- a/modules/scene/include/vkcv/scene/Frustum.hpp +++ b/modules/scene/include/vkcv/scene/Frustum.hpp @@ -4,9 +4,16 @@ #include "vkcv/scene/Bounds.hpp" namespace vkcv::scene { + + /** + * @addtogroup vkcv_scene + * @{ + */ Bounds transformBounds(const glm::mat4& transform, const Bounds& bounds, bool* negative_w = nullptr); bool checkFrustum(const glm::mat4& transform, const Bounds& bounds); + + /** @} */ } diff --git a/modules/scene/include/vkcv/scene/Mesh.hpp b/modules/scene/include/vkcv/scene/Mesh.hpp index bc82af4bfabed5e8bfc286bc53cd7b89791726fc..fc89cd02747450f6019b78f8c55df4793efe2141 100644 --- a/modules/scene/include/vkcv/scene/Mesh.hpp +++ b/modules/scene/include/vkcv/scene/Mesh.hpp @@ -7,6 +7,11 @@ #include "MeshPart.hpp" namespace vkcv::scene { + + /** + * @addtogroup vkcv_scene + * @{ + */ typedef typename event_function<const glm::mat4&, const glm::mat4&, PushConstants&, vkcv::DrawcallInfo&>::type RecordMeshDrawcallFunction; @@ -48,5 +53,7 @@ namespace vkcv::scene { const Bounds& getBounds() const; }; + + /** @} */ } diff --git a/modules/scene/include/vkcv/scene/MeshPart.hpp b/modules/scene/include/vkcv/scene/MeshPart.hpp index 0d3467c6b57fcece69eb6f0c609c604fb99907d2..ec1e6c7db26f3221047933dd7a7599c7cdcc4fff 100644 --- a/modules/scene/include/vkcv/scene/MeshPart.hpp +++ b/modules/scene/include/vkcv/scene/MeshPart.hpp @@ -9,6 +9,11 @@ #include "Bounds.hpp" namespace vkcv::scene { + + /** + * @addtogroup vkcv_scene + * @{ + */ class Scene; class Mesh; @@ -51,4 +56,6 @@ namespace vkcv::scene { }; + /** @} */ + } diff --git a/modules/scene/include/vkcv/scene/Node.hpp b/modules/scene/include/vkcv/scene/Node.hpp index 1fcca5b9cbecf1064070d7737d008d2b108371db..dc82ab6269d1ebbcc651b58a61721e78cde06f1a 100644 --- a/modules/scene/include/vkcv/scene/Node.hpp +++ b/modules/scene/include/vkcv/scene/Node.hpp @@ -8,6 +8,11 @@ #include "Mesh.hpp" namespace vkcv::scene { + + /** + * @addtogroup vkcv_scene + * @{ + */ class Scene; @@ -57,5 +62,7 @@ namespace vkcv::scene { const Bounds& getBounds() const; }; + + /** @} */ } diff --git a/modules/scene/include/vkcv/scene/Scene.hpp b/modules/scene/include/vkcv/scene/Scene.hpp index 095c5e278e9e3f76544e884bdb87cea10770307a..f2ea3b3a4064935dc45c81e57a450c440ab6c73b 100644 --- a/modules/scene/include/vkcv/scene/Scene.hpp +++ b/modules/scene/include/vkcv/scene/Scene.hpp @@ -11,6 +11,12 @@ #include "Node.hpp" namespace vkcv::scene { + + /** + * @defgroup vkcv_scene Scene Module + * A module to manage basic scene rendering with CPU-side frustum culling. + * @{ + */ class Scene { friend class MeshPart; @@ -69,5 +75,7 @@ namespace vkcv::scene { static Scene load(Core& core, const std::filesystem::path &path); }; + + /** @} */ } \ No newline at end of file diff --git a/modules/shader_compiler/include/vkcv/shader/Compiler.hpp b/modules/shader_compiler/include/vkcv/shader/Compiler.hpp index 5b119ca5c68f997bacfbea6c60d5c965f9a7a54e..32590e164c834bd1ed92e99c19651750a0becf1c 100644 --- a/modules/shader_compiler/include/vkcv/shader/Compiler.hpp +++ b/modules/shader_compiler/include/vkcv/shader/Compiler.hpp @@ -8,6 +8,12 @@ #include <vkcv/ShaderStage.hpp> namespace vkcv::shader { + + /** + * @defgroup vkcv_shader Shader Compiler Module + * A module to use runtime shader compilation. + * @{ + */ typedef typename event_function<ShaderStage, const std::filesystem::path&>::type ShaderCompiledFunction; @@ -29,5 +35,7 @@ namespace vkcv::shader { void setDefine(const std::string& name, const std::string& value); }; + + /** @} */ } diff --git a/modules/shader_compiler/include/vkcv/shader/GLSLCompiler.hpp b/modules/shader_compiler/include/vkcv/shader/GLSLCompiler.hpp index eca84def118625e21df1c645cfc71b6bcddf7393..a50c5ae0a103592d167f88b2c1db3f190f973948 100644 --- a/modules/shader_compiler/include/vkcv/shader/GLSLCompiler.hpp +++ b/modules/shader_compiler/include/vkcv/shader/GLSLCompiler.hpp @@ -6,6 +6,11 @@ #include "Compiler.hpp" namespace vkcv::shader { + + /** + * @addtogroup vkcv_shader + * @{ + */ class GLSLCompiler : public Compiler { private: @@ -29,5 +34,7 @@ namespace vkcv::shader { const std::filesystem::path& includePath = "", bool update = false) override; }; + + /** @} */ } diff --git a/modules/upscaling/include/vkcv/upscaling/BilinearUpscaling.hpp b/modules/upscaling/include/vkcv/upscaling/BilinearUpscaling.hpp index 52124dc8e36bee7ef7c00de6afcf3457296a7623..08ef6c8c2f7ecb4e2d331349361f34ad2293a864 100644 --- a/modules/upscaling/include/vkcv/upscaling/BilinearUpscaling.hpp +++ b/modules/upscaling/include/vkcv/upscaling/BilinearUpscaling.hpp @@ -3,6 +3,11 @@ #include "Upscaling.hpp" namespace vkcv::upscaling { + + /** + * @addtogroup vkcv_upscaling + * @{ + */ class BilinearUpscaling : public Upscaling { private: @@ -15,4 +20,6 @@ namespace vkcv::upscaling { }; + /** @} */ + } diff --git a/modules/upscaling/include/vkcv/upscaling/FSRUpscaling.hpp b/modules/upscaling/include/vkcv/upscaling/FSRUpscaling.hpp index 4d3316718bf995f5cc8ccddde8c74575beba7745..56cc97419a694d8f2b4f5f5f75966d0af9af6bbe 100644 --- a/modules/upscaling/include/vkcv/upscaling/FSRUpscaling.hpp +++ b/modules/upscaling/include/vkcv/upscaling/FSRUpscaling.hpp @@ -5,6 +5,11 @@ #include <vkcv/ShaderProgram.hpp> namespace vkcv::upscaling { + + /** + * @addtogroup vkcv_upscaling + * @{ + */ enum class FSRQualityMode : int { NONE = 0, @@ -80,4 +85,6 @@ namespace vkcv::upscaling { }; + /** @} */ + } diff --git a/modules/upscaling/include/vkcv/upscaling/Upscaling.hpp b/modules/upscaling/include/vkcv/upscaling/Upscaling.hpp index c44e878ad78f0a3359599c76f781371505fd3a85..acc33c8edc37115265a4f95d014a8eee394d4234 100644 --- a/modules/upscaling/include/vkcv/upscaling/Upscaling.hpp +++ b/modules/upscaling/include/vkcv/upscaling/Upscaling.hpp @@ -4,6 +4,12 @@ #include <vkcv/Handles.hpp> namespace vkcv::upscaling { + + /** + * @defgroup vkcv_upscaling Upscaling Module + * A module to upscale an image from an internal resolution to a final resolution in realtime. + * @{ + */ class Upscaling { protected: @@ -19,5 +25,7 @@ namespace vkcv::upscaling { const ImageHandle& output) = 0; }; + + /** @} */ }