Application.hpp 638 B

123456789101112131415161718192021222324252627282930313233343536
  1. #ifndef PARTICLE_GPU
  2. #define PARTICLE_GPU
  3. /* std */
  4. #include <iostream>
  5. // #include <vector>
  6. #include <string>
  7. /* OpenGL */
  8. #include "glad/glad.h"
  9. #include <GLFW/glfw3.h>
  10. class Application
  11. {
  12. private:
  13. int m_window_width{};
  14. int m_window_heigth{};
  15. std::string m_appName = "Lyfe";
  16. GLFWwindow* m_window{};
  17. public:
  18. Application() = default;
  19. Application(int width, int height);
  20. ~Application();
  21. void init();
  22. void terminate();
  23. bool create_window();
  24. void register_callback(GLFWkeyfun);
  25. bool running();
  26. void update();
  27. int key_status(int code);
  28. float time();
  29. };
  30. #endif // PARTICLE_GPU