![]() |
Inviwo 0.9.12-pre
Inviwo documentation
|
Public Member Functions | |
| void | bind () const |
| BufferGL (const BufferGL &rhs) | |
| 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. | |
| virtual BufferGL * | clone () const override |
| void | disable () const |
| void | download (void *data) const |
| void | enable () const |
| virtual std::shared_ptr< BufferObject > | getBufferObject () const |
| virtual const DataFormatBase * | getDataFormat () const override |
| GLenum | getFormatType () const |
| GLuint | getId () const |
| virtual size_t | getSize () const override |
| virtual std::type_index | getTypeIndex () const override final |
| 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. | |
| void | unbind () const |
| void | upload (const void *data, GLsizeiptr sizeInBytes) |
| Public Member Functions inherited from inviwo::BufferRepresentation | |
| BufferTarget | getBufferTarget () const |
| BufferUsage | getBufferUsage () const |
| DataFormatId | getDataFormatId () const |
| std::string_view | getDataFormatString () const |
| virtual size_t | getSizeOfElement () const |
| Public Member Functions inherited from inviwo::DataRepresentation< BufferBase > | |
| const BufferBase * | getOwner () const |
| bool | isValid () const |
| void | setOwner (const BufferBase *owner) |
| void | setValid (bool valid) |
| virtual void | updateResource (const ResourceMeta &) const |
Protected Attributes | |
| std::shared_ptr< BufferObject > | buffer_ |
| std::unique_ptr< BufferObjectArray > | bufferArray_ |
| size_t | size_ |
| Protected Attributes inherited from inviwo::BufferRepresentation | |
| BufferTarget | target_ |
| BufferUsage | usage_ |
| Protected Attributes inherited from inviwo::DataRepresentation< BufferBase > | |
| bool | isValid_ |
| const BufferBase * | owner_ |
Additional Inherited Members | |
| Public Types inherited from inviwo::DataRepresentation< BufferBase > | |
| using | ReprOwner |
| Protected Member Functions inherited from inviwo::BufferRepresentation | |
| BufferRepresentation (BufferUsage usage=BufferUsage::Static, BufferTarget target=BufferTarget::Data) | |
| BufferRepresentation (const BufferRepresentation &rhs)=default | |
| BufferRepresentation & | operator= (const BufferRepresentation &that)=default |
| Protected Member Functions inherited from inviwo::DataRepresentation< BufferBase > | |
| DataRepresentation & | operator= (const DataRepresentation &that)=default |
| 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.
| 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. |
|
overridevirtual |
Implements inviwo::BufferRepresentation.
|
overridevirtual |
Implements inviwo::BufferRepresentation.
|
overridevirtual |
Return the number of elements in the buffer.
Implements inviwo::BufferRepresentation.
|
finaloverridevirtual |
Implements inviwo::DataRepresentation< BufferBase >.
|
overridevirtual |
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.
Implements inviwo::BufferRepresentation.