diff --git a/src/vkcv/CoreManager.hpp b/src/vkcv/CoreManager.hpp index 2485ce00be505a1f0745ff856c51facaf60683a1..6aebcf6470e6fcaf4c0aec03d14a6ccd84e538bb 100644 --- a/src/vkcv/CoreManager.hpp +++ b/src/vkcv/CoreManager.hpp @@ -6,11 +6,12 @@ namespace vkcv { /** - * initialize GLFW if not initialized + * initializes glfw once and increases the counter */ void initGLFW(); + /** - * terminate GLFW + * terminates glfw once, if it was initialized or decreases the counter */ void terminateGLFW(); } diff --git a/src/vkcv/Window.hpp b/src/vkcv/Window.hpp index 9dd4c1b18b921a85bdcd24c48641569fbec0cf7a..1681893be18162c882f25904251c23bf0b3254de 100644 --- a/src/vkcv/Window.hpp +++ b/src/vkcv/Window.hpp @@ -12,19 +12,47 @@ namespace vkcv { GLFWwindow *m_window; public: + /** + * creates a GLFWwindow with the parameters in the function + * @param windowTitle + * @param width + * @param height + * @param resizable + * @return Window class + */ static Window create(const char *windowTitle, int width = -1, int height = -1, bool resizable = false); + /** + * checks if the window is still open, or the close event was called + * This function should be changed/removed later on + * @return bool if the window is still open + */ [[nodiscard]] bool isWindowOpen() const; + /** + * polls all events on the GLFWwindow + */ static void pollEvents(); + /** + * returns the current window + * @return window handle + */ [[nodiscard]] GLFWwindow *getWindow() const; + /** + * gets the current window width + * @return int with window width + */ [[nodiscard]] int getWidth() const; + /** + * gets the current window height + * @return int with window height + */ [[nodiscard]] int getHeight() const;