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

#include <mesh.hpp>

Public Member Functions

 Mesh ()=default
 
 Mesh (const vulkan::Device &device, VmaAllocator allocator)
 
 Mesh (const std::vector< Vertex > &vertices, const std::vector< uint16_t > &indices)
 
void load (const vulkan::Device &device, VmaAllocator allocator)
 
void shader (const std::shared_ptr< vk::Shader > &shader)
 
void draw (const ::vk::CommandBuffer &cmd) const
 
void bind (const ::vk::CommandBuffer &cmd) const
 
auto loaded () const
 

Private Attributes

bool loaded_ = false
 
std::shared_ptr< vk::Shader > shader_
 
std::vector< Vertexvertices_
 
std::vector< uint16_t > indices_
 
std::shared_ptr< vk::Bufferindex_buffer_
 
std::shared_ptr< vk::Buffervertex_buffer_
 
std::shared_ptr< vk::Bufferuniform_buffer_
 

Constructor & Destructor Documentation

◆ Mesh() [1/3]

wren::Mesh::Mesh ( )
default

◆ Mesh() [2/3]

wren::Mesh::Mesh ( const vulkan::Device & device,
VmaAllocator allocator )
Here is the call graph for this function:

◆ Mesh() [3/3]

wren::Mesh::Mesh ( const std::vector< Vertex > & vertices,
const std::vector< uint16_t > & indices )

Member Function Documentation

◆ bind()

void wren::Mesh::bind ( const ::vk::CommandBuffer & cmd) const

◆ draw()

void wren::Mesh::draw ( const ::vk::CommandBuffer & cmd) const

◆ load()

void wren::Mesh::load ( const vulkan::Device & device,
VmaAllocator allocator )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ loaded()

auto wren::Mesh::loaded ( ) const
inline

◆ shader()

void wren::Mesh::shader ( const std::shared_ptr< vk::Shader > & shader)
inline
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ index_buffer_

std::shared_ptr<vk::Buffer> wren::Mesh::index_buffer_
private

◆ indices_

std::vector<uint16_t> wren::Mesh::indices_
private

◆ loaded_

bool wren::Mesh::loaded_ = false
private

◆ shader_

std::shared_ptr<vk::Shader> wren::Mesh::shader_
private

◆ uniform_buffer_

std::shared_ptr<vk::Buffer> wren::Mesh::uniform_buffer_
private

◆ vertex_buffer_

std::shared_ptr<vk::Buffer> wren::Mesh::vertex_buffer_
private

◆ vertices_

std::vector<Vertex> wren::Mesh::vertices_
private

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