Initial setup with SDL window
This commit is contained in:
30
include/vulkanapp.hh
Normal file
30
include/vulkanapp.hh
Normal file
@@ -0,0 +1,30 @@
|
||||
#pragma once
|
||||
|
||||
#include "SDL_video.h"
|
||||
#include "SDL_events.h"
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
#include <vulkan/vulkan.h>
|
||||
|
||||
class VulkanApp {
|
||||
public:
|
||||
VulkanApp(const uint32_t& _w, const uint32_t& _h) :
|
||||
mWidth(_w), mHeight(_h), mWin(nullptr), mActive(false) {}
|
||||
|
||||
void run() {
|
||||
init();
|
||||
loop();
|
||||
cleanup();
|
||||
}
|
||||
|
||||
SDL_Window *mWin;
|
||||
SDL_Event mEvent;
|
||||
const uint32_t mWidth;
|
||||
const uint32_t mHeight;
|
||||
bool mActive;
|
||||
|
||||
void init();
|
||||
void loop();
|
||||
void cleanup();
|
||||
};
|
||||
Reference in New Issue
Block a user