vulkanTutorial/VulkanTutorial.h

54 lines
822 B
C
Raw Normal View History

2024-02-18 23:22:05 +08:00
// VulkanTutorial.h: 标准系统包含文件的包含文件
// 或项目特定的包含文件。
#pragma once
#define GLFW_INCLUDE_VULKAN
#include<GLFW/glfw3.h>
#include <iostream>
#include <stdexcept>
#include <functional>
#include <cstdlib>
class HelloTriangleApplication
{
public:
HelloTriangleApplication();
~HelloTriangleApplication();
void run(int Width, int Height) {
GLFWwindow* window = initWindow(Width,Height);
initVulkan();
mainLoop(window);
cleanup(window);
}
private:
2024-02-19 16:30:49 +08:00
VkInstance instance;
2024-02-18 23:22:05 +08:00
GLFWwindow* initWindow(int Width, int Height);
2024-02-19 16:30:49 +08:00
void createInstance();
void initVulkan();
2024-02-18 23:22:05 +08:00
void mainLoop(GLFWwindow* window);
void cleanup(GLFWwindow* window);
};
HelloTriangleApplication::HelloTriangleApplication()
{
}
HelloTriangleApplication::~HelloTriangleApplication()
{
}