Change library to make it less buggy when destroying objects
# Conflicts: # include/window.hpp # src/window.cpp
This commit is contained in:
parent
32b6c523c3
commit
bc12874c80
5 changed files with 71 additions and 52 deletions
22
include/context_window.hpp
Normal file
22
include/context_window.hpp
Normal file
|
@ -0,0 +1,22 @@
|
|||
#ifndef SCRATCHBSDF_CONTEXT_WINDOW_HPP
|
||||
#define SCRATCHBSDF_CONTEXT_WINDOW_HPP
|
||||
|
||||
#include <GLFW/glfw3.h>
|
||||
|
||||
namespace window {
|
||||
class ContextWindow final {
|
||||
private:
|
||||
bool init{ false };
|
||||
|
||||
public:
|
||||
ContextWindow() noexcept = delete;
|
||||
|
||||
explicit ContextWindow(const GLFWerrorfun error_clbk) noexcept;
|
||||
|
||||
~ContextWindow() noexcept;
|
||||
|
||||
[[nodiscard]] inline bool is_init() const { return init; }
|
||||
};
|
||||
} // window
|
||||
|
||||
#endif //SCRATCHBSDF_CONTEXT_WINDOW_HPP
|
Loading…
Add table
Add a link
Reference in a new issue