vktutorial/first_app.hpp

38 lines
745 B
C++
Raw Permalink Normal View History

2024-02-21 13:28:50 +08:00
#pragma once
#include "hk_device.hpp"
2024-04-03 21:28:08 +08:00
#include "hk_game_object.hpp"
2024-02-21 13:28:50 +08:00
#include "hk_window.hpp"
2024-04-03 21:28:08 +08:00
#include "hk_renderer.hpp"
2024-02-21 13:28:50 +08:00
// std
#include <memory>
#include <vector>
namespace hk
{
class FirstApp
{
public:
static constexpr int WIDTH = 800;
static constexpr int HEIGHT = 600;
FirstApp();
~FirstApp();
FirstApp(const FirstApp &) = delete;
FirstApp &operator=(const FirstApp &) = delete;
void run();
2024-04-12 23:24:53 +08:00
void runGravitySystem();
2024-02-21 13:28:50 +08:00
private:
2024-04-03 21:28:08 +08:00
void loadGameObjects();
Window m_window{WIDTH, HEIGHT, "Hello Vulkan!"};
Device m_device{m_window};
Renderer m_renderer{m_window, m_device};
std::vector<GameObject> m_gameObjects;
2024-02-21 13:28:50 +08:00
};
}