4#include <vulkan/vulkan.hpp>
7#include <wren_math/matrix.hpp>
8#include <wren_math/vector.hpp>
14 wren::math::vec2f
pos;
28 wren::math::vec2f
pos;
54 void bind(const ::vk::CommandBuffer& cmd);
55 void flush(const ::vk::CommandBuffer& cmd);
62 auto BeginWindow(
const std::string& name,
const wren::math::vec2f& size)
69 void draw_quad(
const wren::math::vec2f& pos,
const wren::math::vec2f& size,
72 auto point_in_bounds(
const wren::math::vec2f& p,
const wren::math::vec2f& pos,
73 const wren::math::vec2f& size) -> bool;
Definition instance.hpp:45
void draw_quad(const wren::math::vec2f &pos, const wren::math::vec2f &size, const wren::math::Vec4f &colour)
Definition instance.cpp:155
void flush(const ::vk::CommandBuffer &cmd)
Definition instance.cpp:56
auto shader() const
Definition instance.hpp:52
::vk::Queue graphics_queue
Definition instance.hpp:81
std::queue< std::string > stack
Definition instance.hpp:91
std::vector< uint16_t > indices
Definition instance.hpp:88
Inputs io
Definition instance.hpp:93
void End()
Definition instance.cpp:54
auto point_in_bounds(const wren::math::vec2f &p, const wren::math::vec2f &pos, const wren::math::vec2f &size) -> bool
Definition instance.cpp:173
std::map< std::string, Window > windows_
Definition instance.hpp:90
std::shared_ptr< wren::vk::Buffer > vertex_buffer
Definition instance.hpp:77
std::shared_ptr< vk::Buffer > uniform_buffer
Definition instance.hpp:78
::vk::CommandPool command_pool
Definition instance.hpp:82
void resize_viewport(const ::vk::Extent2D &size)
Definition instance.hpp:57
VmaAllocator allocator
Definition instance.hpp:86
std::vector< Vertex > vertices
Definition instance.hpp:87
::vk::Device device
Definition instance.hpp:80
auto BeginWindow(const std::string &name, const wren::math::vec2f &size) -> bool
Definition instance.cpp:109
void Begin()
Definition instance.cpp:49
std::shared_ptr< wren::vk::Buffer > index_buffer
Definition instance.hpp:76
::vk::Extent2D output_size
Definition instance.hpp:84
Instance(const std::shared_ptr< vk::Shader > &shader, const ::vk::Device &device, const VmaAllocator &allocator, const ::vk::CommandPool &command_pool, const ::vk::Queue &graphics_queue)
Definition instance.cpp:12
auto IO() -> Inputs &
Definition instance.hpp:66
void EndWindow()
Definition instance.cpp:138
std::shared_ptr< vk::Shader > shader_
Definition instance.hpp:75
void bind(const ::vk::CommandBuffer &cmd)
Inputs previous_io
Definition instance.hpp:94
Definition instance.hpp:10
static const std::size_t MAX_VERTICES
Definition instance.hpp:24
static const std::size_t MAX_INDICES
Definition instance.hpp:25
Definition instance.hpp:32
wren::math::Mat4f proj
Definition instance.hpp:33
Definition instance.hpp:27
wren::math::Vec4f colour
Definition instance.hpp:29
wren::math::vec2f pos
Definition instance.hpp:28
Definition instance.hpp:12
wren::math::vec2f mouse_offset
Definition instance.hpp:21
wren::math::vec2f size
Definition instance.hpp:15
bool hovered
Definition instance.hpp:19
wren::math::vec2f pos
Definition instance.hpp:14
bool selected
Definition instance.hpp:20
std::string name
Definition instance.hpp:13
Definition vector.hpp:154