Molecular Vis
Improving perception of molecular visualization
SSBO< T > Class Template Reference

Wrapper for SSBO buffer (shader storage buffer object) T is the type of the data (struct and has to satisfy allignment conditions, see ssbo doc.) More...

#include <SSBO.h>

Public Member Functions

 SSBO ()
 
 SSBO (unsigned int size)
 
unsigned int getCapacity ()
 
void uploadData (const std::vector< T > &data)
 
void bindToTarget (unsigned int target)
 
void release ()
 

Detailed Description

template<class T>
class SSBO< T >

Wrapper for SSBO buffer (shader storage buffer object) T is the type of the data (struct and has to satisfy allignment conditions, see ssbo doc.)

Constructor & Destructor Documentation

◆ SSBO() [1/2]

template<class T >
SSBO< T >::SSBO ( )

Empty constructor, does nothing.

◆ SSBO() [2/2]

template<class T >
SSBO< T >::SSBO ( unsigned int  size)

Creates SSBO with given capacity.

Parameters
sizeThe number of elements of type T that can be saved in this SSBO.

Member Function Documentation

◆ bindToTarget()

template<class T >
void SSBO< T >::bindToTarget ( unsigned int  target)

Binds buffer to indexed buffer target (number in shader layout(..,target))

◆ getCapacity()

template<class T >
unsigned int SSBO< T >::getCapacity ( )

returns capacity of buffer

◆ release()

template<class T >
void SSBO< T >::release ( )

Deletes the buffer

◆ uploadData()

template<class T>
void SSBO< T >::uploadData ( const std::vector< T > &  data)

Uploads data to Buffer. data.size()) has to be less than capacity


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