29 lines
708 B
C++
29 lines
708 B
C++
#ifndef SCRATCHBSDF_CONTEXT_WINDOW_HPP
|
|
#define SCRATCHBSDF_CONTEXT_WINDOW_HPP
|
|
|
|
#include <GLFW/glfw3.h>
|
|
|
|
namespace window {
|
|
/*!
|
|
* \brief This class is a RAII object for GLFW library.
|
|
*/
|
|
class ContextWindow final {
|
|
private:
|
|
bool init{ false };
|
|
|
|
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;
|
|
|
|
[[nodiscard]] inline bool is_init() const { return init; }
|
|
};
|
|
} // window
|
|
|
|
#endif //SCRATCHBSDF_CONTEXT_WINDOW_HPP
|