app.hpp

1
2
3
4
5
6
7
8
9
#pragma once


#include <planet/ui/baseplate.hpp>
#include <planet/vk-sdl.hpp>
#include <planet/vk/engine/forward.hpp>


namespace planet::vk::engine {

An engine for 2d texture based interfaces

13
14
15
16
17
18
19
20
21
22
23
24
25
    struct app final {
        app(int argc, char const *argv[], planet::sdl::init &, char const *name);


        planet::asset_manager asset_manager;
        planet::sdl::init &sdl;
        planet::sdl::ttf text{sdl};
        planet::vk::sdl::window window;
        planet::vk::extensions extensions{window};
        vk::instance instance;
        vk::device device{instance, extensions};

        planet::ui::baseplate baseplate;

Run the provided UI function

29
30
31
32
33
        int run(felspar::coro::task<int> (*co_main)(app &, renderer &));
    };


}