Window.h 627 B

1234567891011121314151617181920212223242526272829303132
  1. #ifndef WINDOW_H
  2. #define WINDOW_H
  3. #include <GL/glew.h>
  4. #include <GLFW/glfw3.h>
  5. #include "rendering/WindowOptions.h"
  6. class Window final {
  7. GLFWwindow* window;
  8. public:
  9. Window(const WindowOptions& options);
  10. ~Window();
  11. Window(const Window&) = delete;
  12. Window& operator=(const Window&) = delete;
  13. Window(Window&&) = delete;
  14. Window& operator=(Window&&) = delete;
  15. bool hasError() const;
  16. void show();
  17. bool shouldClose() const;
  18. void swapBuffers();
  19. void trapCursor(bool trap);
  20. Size getSize() const;
  21. Size getFramebufferSize() const;
  22. bool isKeyDown(int key) const;
  23. };
  24. #endif