summaryrefslogtreecommitdiff
path: root/engine/xe_engine.cpp
blob: 8d2655a767751af5658456094cf579e3874f7030 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include "xe_engine.hpp"
#include "xe_descriptors.hpp"

namespace xe {

XeEngine::XeEngine(int width, int height, std::string name) 
  : xeWindow{width, height, name}, xeDevice{xeWindow}, xeRenderer{xeWindow, xeDevice} {};

void XeEngine::loadDescriptorPool() {
  xeDescriptorPool = 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();
}

}