From 8754e31367f6fcfcda4bf50d373797a048dedf53 Mon Sep 17 00:00:00 2001 From: tylermurphy534 Date: Mon, 19 Sep 2022 07:08:42 -0400 Subject: start refactoring, doesnt compile --- src/first_app.cpp | 7 +------ src/first_app.hpp | 9 ++------- 2 files changed, 3 insertions(+), 13 deletions(-) (limited to 'src') diff --git a/src/first_app.cpp b/src/first_app.cpp index 6a5bfa9..cc8f634 100755 --- a/src/first_app.cpp +++ b/src/first_app.cpp @@ -24,12 +24,7 @@ struct GlobalUbo { glm::vec3 lightDirection = glm::normalize(glm::vec3{-1.f, 3.f, 1.f}); }; -FirstApp::FirstApp() { - globalPool = XeDescriptorPool::Builder(xeDevice) - .setMaxSets(XeSwapChain::MAX_FRAMES_IN_FLIGHT) - .addPoolSize(VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, XeSwapChain::MAX_FRAMES_IN_FLIGHT) - .addPoolSize(VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, XeSwapChain::MAX_FRAMES_IN_FLIGHT) - .build(); +FirstApp::FirstApp() : xeEngine{WIDTH, HEIGHT, "Hello, Vulkan!"} { loadGameObjects(); } diff --git a/src/first_app.hpp b/src/first_app.hpp index bcdf33e..081113d 100755 --- a/src/first_app.hpp +++ b/src/first_app.hpp @@ -1,8 +1,6 @@ #pragma once -#include "xe_renderer.hpp" -#include "xe_window.hpp" -#include "xe_device.hpp" +#include "xe_engine.hpp" #include "xe_game_object.hpp" #include "xe_descriptors.hpp" @@ -26,11 +24,8 @@ class FirstApp { private: void loadGameObjects(); - XeWindow xeWindow{WIDTH, HEIGHT, "Hello Vulkan!"}; - XeDevice xeDevice{xeWindow}; - XeRenderer xeRenderer{xeWindow, xeDevice}; + XeEngine xeEngine; - std::unique_ptr globalPool{}; std::vector gameObjects; }; } \ No newline at end of file -- cgit v1.2.3-freya