A Vulkan-based Buffer implementation.
More...
#include <BufferVK.h>
Inherits Buffer.
|
| | BufferImpl (DriverImpl *, std::size_t size, BufferType type, BufferUsage usage, const void *initial) |
| void | updateData (const void *data, std::size_t size) override |
| | Update buffer data.
|
| void | updateSubData (const void *data, std::size_t offset, std::size_t size) override |
| | Update buffer sub-region data.
|
| void | usingDefaultStoredData (bool needDefaultStoredData) override |
| | By default, static buffer data will automatically stored when it comes to foreground.
|
| std::size_t | getSize () const |
| | Get buffer size in bytes.
|
| void | retain () |
| | Retains the ownership.
|
| void | release () |
| | Releases the ownership immediately.
|
| Object * | autorelease () |
| | Releases the ownership sometime soon automatically.
|
| unsigned int | getReferenceCount () const |
| | Returns the Object's current reference count.
|
| virtual | ~Object () |
| | Destructor.
|
|
|
unsigned int | _ID |
| | object id, ScriptSupport need public _ID
|
|
int | _luaID |
| | Lua reference id.
|
A Vulkan-based Buffer implementation.
◆ BufferImpl()
| BufferImpl |
( |
DriverImpl * | , |
|
|
std::size_t | size, |
|
|
BufferType | type, |
|
|
BufferUsage | usage, |
|
|
const void * | initial ) |
- Parameters
-
| device | Vulkan logical device |
| physical | Vulkan physical device (for memory properties) |
| size | request size of buffer |
| type | BufferType::VERTEX or BufferType::INDEX |
| usage | BufferUsage::STATIC / DYNAMIC / STREAM |
| initial | initial data |
◆ updateData()
| void updateData |
( |
const void * | data, |
|
|
std::size_t | size ) |
|
overridevirtual |
Update buffer data.
- Parameters
-
| data | Specifies a pointer to data that will be copied into the data store for initialization. |
| size | Specifies the size in bytes of the data store region being replaced. |
- See also
- updateSubData(void* data, unsigned int offset, unsigned int size)
Implements Buffer.
◆ updateSubData()
| void updateSubData |
( |
const void * | data, |
|
|
std::size_t | offset, |
|
|
std::size_t | size ) |
|
overridevirtual |
Update buffer sub-region data.
- Parameters
-
| data | Specifies a pointer to the new data that will be copied into the data store. |
| offset | Specifies the offset into the buffer object's data store where data replacement will begin, measured in bytes. |
| size | Specifies the size in bytes of the data store region being replaced. |
- See also
- updateData(void* data, unsigned int size)
Implements Buffer.
◆ usingDefaultStoredData()
| void usingDefaultStoredData |
( |
bool | needDefaultStoredData | ) |
|
|
overridevirtual |
By default, static buffer data will automatically stored when it comes to foreground.
This function is used to indicate whether external data needs to be used to update the buffer instead of using the default stored data.
- Parameters
-
| needDefaultStoredData | Specifies whether to use the default stored data. |
Implements Buffer.
The documentation for this class was generated from the following file: