VPP  0.8
A high-level modern C++ API for Vulkan
vpp::TexelBufferView< FormatT, USAGE > Class Template Reference

Buffer view for texel buffers. More...

#include <vppBufferView.hpp>

Public Member Functions

 TexelBufferView ()
 Constructs null reference.
 
template<class BufferT , class MemoryT >
 TexelBufferView (const MemoryBinding< BufferT, MemoryT > &binding)
 Constructs view object for entire buffer (bound to memory).
 
template<class BufferT , class MemoryT >
 TexelBufferView (VkDeviceSize offset, VkDeviceSize size, const MemoryBinding< BufferT, MemoryT > &binding)
 Constructs view object for a slice of given buffer (bound to memory).
 
template<unsigned int US>
 TexelBufferView (const TexelBufferView< FormatT, US > &otherView)
 Converts texel view to different view with compatible usage.
 
 operator VkBufferView () const
 Retrieves Vulkan handle of the view.
 
const Bufbuffer () const
 Retrieves a reference to the buffer.
 

Detailed Description

template<class FormatT, unsigned int USAGE>
class vpp::TexelBufferView< FormatT, USAGE >

Buffer view for texel buffers.

A buffer view is auxiliary object that acts as an interface between the buffer and the binding point in the pipeline. In case of texel buffers, the view is actual Vulkan object and has two functions:

  • providing information about the format of the data inside the buffer,
  • optionally, specifying a buffer slice.

You must hold the TexelBufferView object along with your buffer. This is similar to image buffer views.

As the first template argument, use one of VPP format classes. The second argument is bitwise OR of one or both of the following values:

  • Buf::UNITEX - for a view to be used with a uniform texel buffer,
  • Buf::STORTEX - for a view to be used with a storage texel buffer.

This object is reference-counted and may be passed by value.


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