first_app.h 875 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #pragma once
  2. #include "coral_device.h"
  3. #include "coral_window.h"
  4. #include "coral_gameobject.h"
  5. #include "coral_renderer.h"
  6. #include "coral_descriptors.h"
  7. #include "coral_texture.h"
  8. #include "world_generator.h"
  9. // STD
  10. #include <memory>
  11. #include <vector>
  12. namespace coral_3d
  13. {
  14. class first_app final
  15. {
  16. public:
  17. static constexpr int WIDTH{ 800 };
  18. static constexpr int HEIGHT{ 600 };
  19. first_app();
  20. ~first_app();
  21. first_app(const first_app&) = delete;
  22. first_app& operator=(const first_app&) = delete;
  23. void run();
  24. private:
  25. void generate_world();
  26. coral_window window_{ WIDTH, HEIGHT, "Coral Renderer" };
  27. coral_device device_{ window_ };
  28. coral_renderer renderer_{ window_, device_ };
  29. std::unique_ptr<coral_texture> atlas_texture_;
  30. std::unique_ptr<coral_descriptor_pool> global_descriptor_pool_{};
  31. world_generator world_generator_{device_};
  32. };
  33. }