wren
Vulkan-based game engine
Loading...
Searching...
No Matches
wren::gui::Instance Class Reference

#include <instance.hpp>

Collaboration diagram for wren::gui::Instance:

Public Member Functions

 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)
 
auto shader () const
 
void bind (const ::vk::CommandBuffer &cmd)
 
void flush (const ::vk::CommandBuffer &cmd)
 
void resize_viewport (const ::vk::Extent2D &size)
 
void Begin ()
 
void End ()
 
auto BeginWindow (const std::string &name, const wren::math::vec2f &size) -> bool
 
void EndWindow ()
 
auto IO () -> Inputs &
 

Private Member Functions

void draw_quad (const wren::math::vec2f &pos, const wren::math::vec2f &size, const wren::math::Vec4f &colour)
 
auto point_in_bounds (const wren::math::vec2f &p, const wren::math::vec2f &pos, const wren::math::vec2f &size) -> bool
 

Private Attributes

std::shared_ptr< vk::Shader > shader_
 
std::shared_ptr< wren::vk::Bufferindex_buffer
 
std::shared_ptr< wren::vk::Buffervertex_buffer
 
std::shared_ptr< vk::Bufferuniform_buffer
 
::vk::Device device
 
::vk::Queue graphics_queue
 
::vk::CommandPool command_pool
 
::vk::Extent2D output_size
 
VmaAllocator allocator
 
std::vector< Vertexvertices
 
std::vector< uint16_t > indices
 
std::map< std::string, Windowwindows_
 
std::queue< std::string > stack
 
Inputs io
 
Inputs previous_io
 

Constructor & Destructor Documentation

◆ Instance()

wren::gui::Instance::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 )
Here is the call graph for this function:

Member Function Documentation

◆ Begin()

void wren::gui::Instance::Begin ( )

◆ BeginWindow()

auto wren::gui::Instance::BeginWindow ( const std::string & name,
const wren::math::vec2f & size ) -> bool

◆ bind()

void wren::gui::Instance::bind ( const ::vk::CommandBuffer & cmd)

◆ draw_quad()

void wren::gui::Instance::draw_quad ( const wren::math::vec2f & pos,
const wren::math::vec2f & size,
const wren::math::Vec4f & colour )
private
Here is the caller graph for this function:

◆ End()

void wren::gui::Instance::End ( )

◆ EndWindow()

void wren::gui::Instance::EndWindow ( )
Here is the call graph for this function:

◆ flush()

void wren::gui::Instance::flush ( const ::vk::CommandBuffer & cmd)
Here is the call graph for this function:

◆ IO()

auto wren::gui::Instance::IO ( ) -> Inputs&
inline

◆ point_in_bounds()

auto wren::gui::Instance::point_in_bounds ( const wren::math::vec2f & p,
const wren::math::vec2f & pos,
const wren::math::vec2f & size ) -> bool
private
Here is the call graph for this function:

◆ resize_viewport()

void wren::gui::Instance::resize_viewport ( const ::vk::Extent2D & size)
inline

◆ shader()

auto wren::gui::Instance::shader ( ) const
inline

Member Data Documentation

◆ allocator

VmaAllocator wren::gui::Instance::allocator
private

◆ command_pool

::vk::CommandPool wren::gui::Instance::command_pool
private

◆ device

::vk::Device wren::gui::Instance::device
private

◆ graphics_queue

::vk::Queue wren::gui::Instance::graphics_queue
private

◆ index_buffer

std::shared_ptr<wren::vk::Buffer> wren::gui::Instance::index_buffer
private

◆ indices

std::vector<uint16_t> wren::gui::Instance::indices
private

◆ io

Inputs wren::gui::Instance::io
private

◆ output_size

::vk::Extent2D wren::gui::Instance::output_size
private

◆ previous_io

Inputs wren::gui::Instance::previous_io
private

◆ shader_

std::shared_ptr<vk::Shader> wren::gui::Instance::shader_
private

◆ stack

std::queue<std::string> wren::gui::Instance::stack
private

◆ uniform_buffer

std::shared_ptr<vk::Buffer> wren::gui::Instance::uniform_buffer
private

◆ vertex_buffer

std::shared_ptr<wren::vk::Buffer> wren::gui::Instance::vertex_buffer
private

◆ vertices

std::vector<Vertex> wren::gui::Instance::vertices
private

◆ windows_

std::map<std::string, Window> wren::gui::Instance::windows_
private

The documentation for this class was generated from the following files: