Nebula
Loading...
Searching...
No Matches
shaderidentifier.h
Go to the documentation of this file.
1#pragma once
2//------------------------------------------------------------------------------
20#include "core/types.h"
21#include "util/stringatom.h"
22#include "util/array.h"
23#include "util/dictionary.h"
24namespace Base
25{
26 class ShaderServerBase;
27}
28
29//------------------------------------------------------------------------------
30namespace CoreGraphics
31{
33{
34public:
38 typedef IndexT Code;
39
41 static Code FromName(const Name& name);
43 static Name ToName(Code c);
45 static const IndexT MaxNumShaderIdentifiers = 128;
48
49private:
51
54
57};
58
59} // namespace CoreGraphics
60//------------------------------------------------------------------------------
61
The ShaderServer loads all shaders when created, meaning all shaders in the project must be valid and...
Definition shaderserverbase.h:59
The ShaderIdentifier is a zero-indexed registry which is used to identify shaders in a constant time ...
Definition shaderidentifier.h:33
Util::StringAtom Name
human readable name of a ModelNodeType
Definition shaderidentifier.h:36
IndexT Code
binary code for a ModelNodeType
Definition shaderidentifier.h:38
static Code FromName(const Name &name)
convert from string
Definition shaderidentifier.cc:29
ShaderIdentifier()
constructor
Definition shaderidentifier.cc:19
Util::Dictionary< Name, IndexT > nameToCode
Definition shaderidentifier.h:55
static const IndexT MaxNumShaderIdentifiers
maximum number of different ModelNodeTypes
Definition shaderidentifier.h:45
static Name ToName(Code c)
convert to string
Definition shaderidentifier.cc:51
static const IndexT InvalidBatchType
invalid model node type code
Definition shaderidentifier.h:47
Util::Array< Name > codeToName
Definition shaderidentifier.h:56
Nebula's dynamic array class.
Definition array.h:60
A collection of key/value pairs with quick value retrieval by key at roughly O(log n).
Definition dictionary.h:34
A StringAtom.
Definition stringatom.h:22
Definition gamecontentserverbase.cc:10
Acceleration structures are used to enable ray tracing on the GPU by dividing the scene into a BVH.
Definition accelerationstructure.h:24
static const int InvalidIndex
Definition types.h:54
int IndexT
Definition types.h:48