wren
Vulkan-based game engine
Loading...
Searching...
No Matches
instance.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <vulkan/vulkan.hpp>
6#include <wren/vk/buffer.hpp>
7#include <wren/vk/shader.hpp>
8
9#include "ui.hpp"
10#include "wren/utils/device.hpp"
11
12namespace wren::gui {
13
18
19class Instance {
20 public:
21 void paint(const Element& root);
22
23 void flush(const ::vk::CommandBuffer& cmd, const vulkan::Device& device,
24 VmaAllocator allocator);
25
26 private:
27 std::vector<Vertex> vertices_{};
28 std::vector<std::int16_t> indices_{};
29 std::shared_ptr<vk::Buffer> index_buffer_;
30 std::shared_ptr<vk::Buffer> vertex_buffer_;
31 // std::shared_ptr<vk::Buffer> uniform_buffer_;
32};
33
34} // namespace wren::gui
Definition instance.hpp:19
std::shared_ptr< vk::Buffer > vertex_buffer_
Definition instance.hpp:30
void paint(const Element &root)
Definition instance.cpp:30
void flush(const ::vk::CommandBuffer &cmd, const vulkan::Device &device, VmaAllocator allocator)
Definition instance.cpp:35
std::vector< Vertex > vertices_
Definition instance.hpp:27
std::vector< std::int16_t > indices_
Definition instance.hpp:28
std::shared_ptr< vk::Buffer > index_buffer_
Definition instance.hpp:29
Definition device.hpp:9
Definition instance.hpp:12
Definition ui.hpp:14
Definition instance.hpp:14
math::Vec2f pos
Definition instance.hpp:15
math::Vec4f col
Definition instance.hpp:16
Definition vector.hpp:161
Definition vector.hpp:192