Window.h 598 B

12345678910111213141516171819202122232425262728293031
  1. #ifndef WINDOW_H
  2. #define WINDOW_H
  3. #include <GL/glew.h>
  4. #include <GLFW/glfw3.h>
  5. #include "rendering/WindowSize.h"
  6. #include "rendering/Options.h"
  7. class Window final {
  8. GLFWwindow* window;
  9. WindowSize& size;
  10. public:
  11. Window(WindowSize& size, const Options& options);
  12. ~Window();
  13. Window(const Window&) = delete;
  14. Window& operator=(const Window&) = delete;
  15. Window(Window&&) = delete;
  16. Window& operator=(Window&&) = delete;
  17. bool hasError() const;
  18. void show();
  19. bool shouldClose() const;
  20. void swapBuffers();
  21. void setKeyCallback(GLFWkeyfun f);
  22. };
  23. #endif