Window.h 736 B

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