feat: refactor to separate files
This commit is contained in:
@@ -5,6 +5,8 @@
|
||||
#ifndef VULKANTEST_HELLOTRIANGLEAPPLICATION_H
|
||||
#define VULKANTEST_HELLOTRIANGLEAPPLICATION_H
|
||||
|
||||
#include "MyVkInstance.h"
|
||||
|
||||
#include <vector>
|
||||
|
||||
#define GLFW_INCLUDE_VULKAN
|
||||
@@ -20,14 +22,7 @@ public:
|
||||
void run();
|
||||
|
||||
private:
|
||||
GLFWwindow* window;
|
||||
VkInstance instance;
|
||||
VkPhysicalDevice physicalDevice = VK_NULL_HANDLE;
|
||||
VkDevice device;
|
||||
VkQueue graphicsQueue;
|
||||
VkQueue presentQueue;
|
||||
VkSurfaceKHR surface;
|
||||
VkDebugUtilsMessengerEXT debugMessenger;
|
||||
MyVkInstance *myVkInstance;
|
||||
VkSwapchainKHR swapChain;
|
||||
std::vector<VkImage> swapChainImages;
|
||||
std::vector<VkImageView> swapChainImageViews;
|
||||
@@ -47,13 +42,7 @@ private:
|
||||
|
||||
int currentFrame = 0;
|
||||
|
||||
// window creation
|
||||
void initWindow();
|
||||
|
||||
// Vulkan initialisation
|
||||
void createInstance();
|
||||
void pickPhysicalDevice();
|
||||
void createLogicalDevice();
|
||||
void createSurface();
|
||||
void createSwapChain();
|
||||
void createImageViews();
|
||||
|
||||
Reference in New Issue
Block a user