![]() |
Jolt Physics
A multi core friendly Game Physics Engine
|
Buffer that can be read from / written to by a compute shader. More...
#include <ComputeBuffer.h>
Public Types | |
| enum class | EType { UploadBuffer , ReadbackBuffer , ConstantBuffer , Buffer , RWBuffer } |
| Type of buffer. More... | |
| enum class | EMode { Read , Write } |
| Mode in which the buffer is accessed. More... | |
Public Member Functions | |
| ComputeBuffer (EType inType, uint64 inSize, uint inStride) | |
| Constructor / Destructor. | |
| virtual | ~ComputeBuffer () |
| EType | GetType () const |
| Properties. | |
| uint64 | GetSize () const |
| uint | GetStride () const |
| void * | Map (EMode inMode) |
| Map / unmap buffer (get pointer to data). | |
| template<typename T > | |
| T * | Map (EMode inMode) |
| void | Unmap () |
| virtual ComputeBufferResult | CreateReadBackBuffer () const =0 |
Public Member Functions inherited from RefTarget< ComputeBuffer > | |
| RefTarget ()=default | |
| Constructor. | |
| RefTarget (const RefTarget &) | |
| ~RefTarget () | |
| assert no one is referencing us | |
| void | SetEmbedded () const |
| RefTarget & | operator= (const RefTarget &) |
| Assignment operator. | |
| uint32 | GetRefCount () const |
| Get current refcount of this object. | |
| void | AddRef () const |
| Add or release a reference to this object. | |
| void | Release () const |
Public Member Functions inherited from NonCopyable | |
| NonCopyable ()=default | |
| NonCopyable (const NonCopyable &)=delete | |
| void | operator= (const NonCopyable &)=delete |
Protected Member Functions | |
| virtual void * | MapInternal (EMode inMode)=0 |
| virtual void | UnmapInternal ()=0 |
Protected Attributes | |
| EType | mType |
| uint64 | mSize |
| uint | mStride |
Protected Attributes inherited from RefTarget< ComputeBuffer > | |
| atomic< uint32 > | mRefCount |
| Current reference count. | |
Additional Inherited Members | |
Static Public Member Functions inherited from RefTarget< ComputeBuffer > | |
| static int | sInternalGetRefCountOffset () |
| INTERNAL HELPER FUNCTION USED BY SERIALIZATION. | |
Static Protected Attributes inherited from RefTarget< ComputeBuffer > | |
| static constexpr uint32 | cEmbedded |
| A large value that gets added to the refcount to mark the object as embedded. | |
Buffer that can be read from / written to by a compute shader.
|
strong |
|
strong |
Type of buffer.
Constructor / Destructor.
|
inlinevirtual |
|
pure virtual |
Create a readback buffer of the same size and stride that can be used to read the data stored in this buffer on CPU. Note that this could also be implemented as 'return this' in case the underlying implementation allows locking GPU data on CPU directly.
|
inline |
|
inline |
|
inline |
Properties.
|
inline |
Map / unmap buffer (get pointer to data).
|
inline |
|
protectedpure virtual |
|
inline |
|
protectedpure virtual |
|
protected |
|
protected |
|
protected |