|
| MapHelper () |
| Initializes the class member with null values.
|
|
| MapHelper (IDeviceContext *pContext, IBuffer *pBuffer, MAP_TYPE MapType, MAP_FLAGS MapFlags) |
|
| MapHelper (MapHelper &&Helper) |
| Move constructor: takes over resource ownership from Helper.
|
|
MapHelper & | operator= (MapHelper &&Helper) |
| Move-assignment operator: takes over resource ownership from Helper.
|
|
void | Map (IDeviceContext *pContext, IBuffer *pBuffer, MAP_TYPE MapType, MAP_FLAGS MapFlags) |
| Maps the provided resource.
|
|
void | Unmap () |
| Unmaps the resource and resets the object state to default.
|
|
| operator DataType * () |
| Converts mapped data pointer to DataType*.
|
|
| operator const DataType * () const |
| Converts mapped data pointer to const DataType*.
|
|
DataType * | operator-> () |
| Operator ->
|
|
const DataType * | operator-> () const |
| Operator const ->
|
|
| ~MapHelper () |
| Unmaps the resource.
|
|
template<typename DataType, bool KeepStrongReferences = false>
class Diligent::MapHelper< DataType, KeepStrongReferences >
Facilitates resource mapping.
- Template Parameters
-
DataType | - type of the mapped data. |
This class is designed to automate resource mapping/unmapping process. The class automatically unmaps the resource when the class instance gets out of scope.
Usage example:
{
MapHelper<float> UniformData{pDeviceContext, pUniformBuff, MAP_WRITE, MAP_FLAG_DISCARD};
UniformData[0] = UniformData[1] = UniformData[2] = UniformData[3] = 1;
}