|
| BufferGL (size_t size, const DataFormatBase *format, BufferUsage usage, BufferTarget target, std::shared_ptr< BufferObject > data=std::shared_ptr< BufferObject >(nullptr)) |
| Create a buffer stored on the GPU.
|
|
| BufferGL (const BufferGL &rhs) |
|
virtual BufferGL * | clone () const override |
|
virtual const DataFormatBase * | getDataFormat () const override |
|
virtual void | setSize (size_t size) override |
| set the size of the buffer Note that the internal BufferObject is only growing in size and never shrinking to avoid unnecessary reallocations in GPU memory.
|
|
virtual size_t | getSize () const override |
|
GLenum | getFormatType () const |
|
GLuint | getId () const |
|
virtual std::shared_ptr< BufferObject > | getBufferObject () const |
|
void | bind () const |
|
void | unbind () const |
|
void | upload (const void *data, GLsizeiptr sizeInBytes) |
|
void | download (void *data) const |
|
void | enable () const |
|
void | disable () const |
|
virtual std::type_index | getTypeIndex () const override final |
|
std::string_view | getDataFormatString () const |
|
DataFormatId | getDataFormatId () const |
|
virtual size_t | getSizeOfElement () const |
|
BufferUsage | getBufferUsage () const |
|
BufferTarget | getBufferTarget () const |
|
void | setOwner (const BufferBase *owner) |
|
const BufferBase * | getOwner () const |
|
bool | isValid () const |
|
void | setValid (bool valid) |
|
virtual void | updateResource (const ResourceMeta &) const |
|
◆ BufferGL()
inviwo::BufferGL::BufferGL |
( |
size_t | size, |
|
|
const DataFormatBase * | format, |
|
|
BufferUsage | usage, |
|
|
BufferTarget | target, |
|
|
std::shared_ptr< BufferObject > | data = std::shared_ptr< BufferObject >(nullptr) ) |
Create a buffer stored on the GPU.
- Parameters
-
size | Size in bytes. |
format | Data format |
usage | BufferUsage::Static if not changing all the time, else BufferUsage::Dynamic. |
target | BufferTarget::Data for vertex buffers and BufferTarget::Index for index buffers |
data | Will be created if nullptr. |
◆ clone()
virtual BufferGL * inviwo::BufferGL::clone |
( |
| ) |
const |
|
overridevirtual |
◆ getDataFormat()
virtual const DataFormatBase * inviwo::BufferGL::getDataFormat |
( |
| ) |
const |
|
overridevirtual |
◆ getSize()
virtual size_t inviwo::BufferGL::getSize |
( |
| ) |
const |
|
overridevirtual |
◆ getTypeIndex()
virtual std::type_index inviwo::BufferGL::getTypeIndex |
( |
| ) |
const |
|
finaloverridevirtual |
◆ setSize()
virtual void inviwo::BufferGL::setSize |
( |
size_t | size | ) |
|
|
overridevirtual |
The documentation for this class was generated from the following file: