MCPcopy Create free account
hub / github.com/Overv/VulkanTutorial / HelloTriangleApplication

Class HelloTriangleApplication

code/00_base_code.cpp:11–47  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9const uint32_t HEIGHT = 600;
10
11class HelloTriangleApplication {
12public:
13 void run() {
14 initWindow();
15 initVulkan();
16 mainLoop();
17 cleanup();
18 }
19
20private:
21 GLFWwindow* window;
22
23 void initWindow() {
24 glfwInit();
25
26 glfwWindowHint(GLFW_CLIENT_API, GLFW_NO_API);
27 glfwWindowHint(GLFW_RESIZABLE, GLFW_FALSE);
28
29 window = glfwCreateWindow(WIDTH, HEIGHT, "Vulkan", nullptr, nullptr);
30 }
31
32 void initVulkan() {
33
34 }
35
36 void mainLoop() {
37 while (!glfwWindowShouldClose(window)) {
38 glfwPollEvents();
39 }
40 }
41
42 void cleanup() {
43 glfwDestroyWindow(window);
44
45 glfwTerminate();
46 }
47};
48
49int main() {
50 HelloTriangleApplication app;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected