| Ocular Engine
    | 
#include <D3D11StructuredBuffer.hpp>
 
  
 | Public Member Functions | |
| D3D11StructuredBuffer (GPUBufferDescriptor const &descriptor) | |
| virtual void | bind () override | 
| virtual void | unbind () override | 
| virtual bool | build (void const *source) override | 
| virtual bool | read (void *destination, uint32_t start, uint32_t size) override | 
| virtual bool | write (void const *source, uint32_t start, uint32_t size) override | 
| ID3D11Buffer * | getD3DBuffer () | 
| ID3D11ShaderResourceView * | getD3DShaderResource () | 
|  Public Member Functions inherited from Ocular::Graphics::GPUBuffer | |
| GPUBuffer (GPUBufferDescriptor const &descriptor) | |
| GPUBufferDescriptor const & | getDescriptor () const | 
| Protected Member Functions | |
| bool | getDevices () | 
| void | releaseResources () | 
| Protected Attributes | |
| ID3D11Device * | m_D3DDevice | 
| ID3D11DeviceContext * | m_D3DDeviceContext | 
| ID3D11Buffer * | m_D3DBuffer | 
| ID3D11ShaderResourceView * | m_D3DSRV | 
|  Protected Attributes inherited from Ocular::Graphics::GPUBuffer | |
| GPUBufferDescriptor | m_Descriptor | 
Implementation of GPUBuffer to be used with HLSL StructuredBuffers. Buffers of this type are bound to the t# registers.
A structured buffer is created by the driver when the following conditions are met by the buffer descriptor:
- CPU Access (None, Read, and/or Write) - GPU Access (Read Only) - Element size is non-zero
For best performance, data in a StructuredBuffer should be 16-byte aligned (float4).
| 
 | overridevirtual | 
Binds the buffer to shader stage and slot specified in the descriptor.
Reimplemented from Ocular::Graphics::GPUBuffer.
| 
 | overridevirtual | 
Attempts to (re)build the buffer. For buffers built without CPU write access, this is the only way to provide data.
| [in] | source | Optional source data. If NULL, buffer will be populated with 0. | 
Reimplemented from Ocular::Graphics::GPUBuffer.
| 
 | overridevirtual | 
Attempts to read data from the buffer. Only available to buffers created with Read CPU Access.
| [out] | destination | Destination to copy buffer data into. | 
| [in] | start | Starting offset into the GPU buffer to start reading from. | 
| [in] | size | Size of data to be read. | 
Reimplemented from Ocular::Graphics::GPUBuffer.
| 
 | overridevirtual | 
Unbinds the buffer in the stage and slot specified by the descriptor.
Reimplemented from Ocular::Graphics::GPUBuffer.
| 
 | overridevirtual | 
Attempts to write data to the buffer. Only available to buffers created with Write CPU Access.
| [in] | source | Source of data to place into buffer. If source is NULL, buffer will be filled with 0. | 
| [in] | start | Starting offset into the GPU buffer to start writing to. | 
| [in] | size | Size of the data to write. | 
Reimplemented from Ocular::Graphics::GPUBuffer.