Nebula
|
#include <shaderidentifier.h>
The ShaderIdentifier is a zero-indexed registry which is used to identify shaders in a constant time (instead of using dictionaries) which can be used to select variables and whatnot using a FixedArray, which is guaranteed to retain the same index during the execution of the application.
Each shader resource will have its own shader identifier code, meaning we are limited to having MaxNumShaderIdentifiers different shader files before this class stops behaving (although this value can be increased if need be)
Public Types | |
typedef Util::StringAtom | Name |
human readable name of a ModelNodeType | |
typedef IndexT | Code |
binary code for a ModelNodeType | |
Static Public Member Functions | |
static Code | FromName (const Name &name) |
convert from string | |
static Name | ToName (Code c) |
convert to string | |
Static Public Attributes | |
static const IndexT | MaxNumShaderIdentifiers = 128 |
maximum number of different ModelNodeTypes | |
static const IndexT | InvalidBatchType = InvalidIndex |
invalid model node type code | |
Private Member Functions | |
ShaderIdentifier () | |
constructor | |
Private Attributes | |
Util::Dictionary< Name, IndexT > | nameToCode |
Util::Array< Name > | codeToName |
Friends | |
class | Base::ShaderServerBase |
binary code for a ModelNodeType
human readable name of a ModelNodeType
|
private |
constructor
Private constructor, only the ShaderServer may create the central ShaderIdentifier registry.
|
static |
convert from string
|
static |
convert to string
|
friend |
|
private |
|
static |
invalid model node type code
|
static |
maximum number of different ModelNodeTypes
|
private |