Window.h 586 B

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