SimpleGL  1.1.0
A framework for platform independent rendering
Public Member Functions | List of all members
sgl::UniformBuffer Class Reference

This class wraps a Vulkan uniform buffer. More...

#include <vertex_buffer.hpp>

Public Member Functions

 UniformBuffer (uint32_t size)
 Creates a new uniform buffer. More...
 
 ~UniformBuffer (void)
 Destroys the vertex buffer. More...
 
VkBuffer getHandle ()
 Returns the handle of the uniform buffer. More...
 
void upload (std::vector< glm::mat2 > data)
 Uploads data to the uniform buffer. More...
 
void upload (std::vector< glm::mat3 > data)
 Uploads data to the uniform buffer. More...
 
void upload (std::vector< glm::mat4 > data)
 Uploads data to the uniform buffer. More...
 

Detailed Description

This class wraps a Vulkan uniform buffer.

Definition at line 87 of file vertex_buffer.hpp.

Constructor & Destructor Documentation

sgl::UniformBuffer::UniformBuffer ( uint32_t  size)

Creates a new uniform buffer.

Parameters
sizeThe size of the buffer in bytes.

Definition at line 123 of file vertex_buffer.cpp.

sgl::UniformBuffer::~UniformBuffer ( void  )

Destroys the vertex buffer.

Definition at line 173 of file vertex_buffer.cpp.

Member Function Documentation

VkBuffer sgl::UniformBuffer::getHandle ( )

Returns the handle of the uniform buffer.

Returns
The handle of the uniform buffer.

Definition at line 181 of file vertex_buffer.cpp.

void sgl::UniformBuffer::upload ( std::vector< glm::mat2 >  data)

Uploads data to the uniform buffer.

Parameters
dataThe data to upload.

Definition at line 185 of file vertex_buffer.cpp.

void sgl::UniformBuffer::upload ( std::vector< glm::mat3 >  data)

Uploads data to the uniform buffer.

Parameters
dataThe data to upload.

Definition at line 195 of file vertex_buffer.cpp.

void sgl::UniformBuffer::upload ( std::vector< glm::mat4 >  data)

Uploads data to the uniform buffer.

Parameters
dataThe data to upload.

Definition at line 205 of file vertex_buffer.cpp.


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