## Public API Reference

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

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

# csShaderVarBlockAlloc Class 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, bool warn_unfreed=false)
| Construct a new allocator.

## Friends

struct | BlockAllocatedSV

## Detailed Description

A block allocator for shader variables.

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

Definition at line 38 of file shadervarblockalloc.h.

## Constructor & Destructor Documentation

csShaderVarBlockAlloc::csShaderVarBlockAlloc | ( | size_t | nelem = `32`,
|  | bool | warn_unfreed = `false`
| ) | `[inline]`

Construct a new allocator.

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

Definition at line 53 of file shadervarblockalloc.h.

## Member Function Documentation

csRef<csShaderVariable> csShaderVarBlockAlloc::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 61 of file shadervarblockalloc.h.

References csBlockAllocator< T, BlockPolicy >::Alloc(), and BlockAllocatedSV.

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

- csgfx/shadervarblockalloc.h