## Public API Reference

- Main Page
- Modules
- Namespaces
- Classes
- Files
- Related Pages

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# csShaderVarBlockAlloc< ObjectDispose > Class Template Reference

A block allocator for shader variables. More...

`#include <csgfx/shadervarblockalloc.h>`

List of all members.

## Public Member Functions

csRef< csShaderVariable > | Alloc ()
| Allocate a new shader variable.
| csShaderVarBlockAlloc (size_t nelem=32)
| Construct a new allocator.

## Friends

struct | BlockAllocatedSV

## Detailed Description

### template<class ObjectDispose = csBlockAllocatorDisposeDelete<csShaderVariable>>
class csShaderVarBlockAlloc< ObjectDispose >

A block allocator for shader variables.

Remarks:
  Check the csBlockAllocator documentation for information on general block allocators.

Definition at line 39 of file shadervarblockalloc.h.

## Constructor & Destructor Documentation

template<class ObjectDispose = csBlockAllocatorDisposeDelete<csShaderVariable>>

csShaderVarBlockAlloc< ObjectDispose >::csShaderVarBlockAlloc | ( | size_t | nelem = `32` | ) | `[inline]`

Construct a new allocator.

Remarks:
  The parameters are the same as to csBlockAllocator<T>::csBlockAllocator().

Definition at line 56 of file shadervarblockalloc.h.

## Member Function Documentation

template<class ObjectDispose = csBlockAllocatorDisposeDelete<csShaderVariable>>

csRef<csShaderVariable> csShaderVarBlockAlloc< ObjectDispose >::Alloc | ( |  | ) | `[inline]`

Allocate a new shader variable.

Remarks:
  Returned object freed when all references are released, but when the allocating block allocator is freed. Make sure no references are kept to objects created by an allocator past its lifetime.

Definition at line 64 of file shadervarblockalloc.h.

References csShaderVarBlockAlloc< ObjectDispose >::BlockAllocatedSV.

The documentation for this class was generated from the following file:

- csgfx/shadervarblockalloc.h