44 lines
805 B
C++
44 lines
805 B
C++
#pragma once
|
|
|
|
#include <core.h>
|
|
#include <VulkanTutorial.h>
|
|
|
|
#include <SDL2/SDL.h>
|
|
|
|
#include <memory>
|
|
|
|
|
|
struct SdlWindowDeleter {
|
|
void operator()(SDL_Window* window) const;
|
|
};
|
|
using WindowUP = std::unique_ptr<SDL_Window, SdlWindowDeleter>;
|
|
|
|
|
|
class VkExpe {
|
|
public:
|
|
VkExpe(int argc, char** argv);
|
|
VkExpe(const VkExpe&) = delete;
|
|
~VkExpe();
|
|
|
|
VkExpe& operator=(const VkExpe&) = delete;
|
|
|
|
void initialize();
|
|
void shutdown();
|
|
|
|
void run();
|
|
|
|
void update(double elapsed);
|
|
|
|
private:
|
|
VulkanTutorial m_vulkan;
|
|
|
|
Vector3 m_camera_position = Vector3(0.0f, 0.0f, -3.0f);
|
|
Vector3 m_camera_z = Vector3(0.0f, 0.0f, 1.0f);
|
|
Vector3 m_camera_y = Vector3(0.0f, 1.0f, 0.0f);
|
|
|
|
WindowUP m_window;
|
|
bool m_running = false;
|
|
|
|
Vector2 m_mouse_offset = Vector2::Zero();
|
|
};
|