diff --git a/include/basic_data.hpp b/include/basic_data.hpp index 58e63a7..502bc22 100644 --- a/include/basic_data.hpp +++ b/include/basic_data.hpp @@ -2,12 +2,9 @@ #define POC2DMODULAR_BASIC_DATA_HPP -#include +#include namespace data { - /*! - * \brief This interface is used by the window::Window class in its callbacks. - */ class BasicData { public: virtual ~BasicData() noexcept = default; @@ -22,7 +19,7 @@ namespace data { virtual void window_size(int width, int height) = 0; - [[nodiscard]] virtual std::string_view get_name() const noexcept = 0; + [[nodiscard]] virtual const std::string &get_name() const noexcept = 0; }; } diff --git a/include/context_window.hpp b/include/context_window.hpp index 9023317..b7fee92 100644 --- a/include/context_window.hpp +++ b/include/context_window.hpp @@ -4,9 +4,6 @@ #include namespace window { - /*! - * \brief This class is a RAII object for GLFW library. - */ class ContextWindow final { private: bool init{ false }; @@ -14,10 +11,6 @@ namespace window { public: ContextWindow() noexcept = delete; - /*! - * \brief Constructor to initialize GLFW library - * \param error_clbk GLFW error callback. Can be null - */ explicit ContextWindow(const GLFWerrorfun error_clbk) noexcept; ~ContextWindow() noexcept; diff --git a/include/opengl_context.hpp b/include/opengl_context.hpp index 2330889..a673fd6 100644 --- a/include/opengl_context.hpp +++ b/include/opengl_context.hpp @@ -10,11 +10,6 @@ namespace gui { } namespace opengl { - /*! - * \brief It takes a window object to get OpenGL context in current thread. - * \param win Window to use to init the GLEW context - * \return True: glew init, false: failed - */ [[nodiscard]] bool init_glew(const gui::Window &win) noexcept; } diff --git a/include/window.hpp b/include/window.hpp index caa2999..1e6a2cb 100644 --- a/include/window.hpp +++ b/include/window.hpp @@ -30,10 +30,8 @@ namespace gui { static void window_pos_callback(GLFWwindow *window, int xpos, int ypos); - //! RAII window. std::unique_ptr wwindow{ nullptr, glfwDestroyWindow }; - //! Modules used in callbacks. modulesType modules; explicit Window(const bool debugOpengl, @@ -48,14 +46,6 @@ namespace gui { Window(Window &&window) noexcept; - /*! - * \brief - * \param [in] framebufferCallback Self-explicit - * \param [in] debugOpengl Boolean to choose if it activates OpenGL's debug mode - * \param [in] shared Another window pointer that shares the OpenGL's context - * \param [in] initializer To initialize Window::modules - * \return Optional containing a Window object if it was successful. - */ [[nodiscard]] static std::optional create_window( GLFWframebuffersizefun framebufferCallback, const bool debugOpengl, @@ -84,21 +74,10 @@ namespace gui { Window &operator=(Window other) noexcept; }; - /*! - * \brief It has to be used **before** creating a Window to put color channels on 10 bits resolution. - */ void color_10_bits() noexcept; - /*! - * \brief It is used to check the color depth for OpenGL's context. - * \param color_depth The color depth to check. Most of the time, 10 or 8 bits. - * \return True: color depth is the input one, else it is not. - */ [[nodiscard]] bool check_color_depth(int color_depth) noexcept; - /*! - * \brief It can be used to activate OpenGL's debug mode before creating a window. - */ void opengl_debug() noexcept; }