Nebula
Toggle main menu visibility
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
"
24
namespace
Base
25
{
26
class
ShaderServerBase
;
27
}
28
29
//------------------------------------------------------------------------------
30
namespace
CoreGraphics
31
{
32
class
ShaderIdentifier
33
{
34
public
:
36
typedef
Util::StringAtom
Name
;
38
typedef
IndexT
Code
;
39
41
static
Code
FromName
(
const
Name
& name);
43
static
Name
ToName
(
Code
c);
45
static
const
IndexT
MaxNumShaderIdentifiers
= 128;
47
static
const
IndexT
InvalidBatchType
=
InvalidIndex
;
48
49
private
:
50
friend
class
Base::ShaderServerBase
;
51
53
ShaderIdentifier
();
54
55
Util::Dictionary<Name, IndexT>
nameToCode
;
56
Util::Array<Name>
codeToName
;
57
};
58
59
}
// namespace CoreGraphics
60
//------------------------------------------------------------------------------
61
array.h
Base::ShaderServerBase
The ShaderServer loads all shaders when created, meaning all shaders in the project must be valid and...
Definition
shaderserverbase.h:59
CoreGraphics::ShaderIdentifier::Name
Util::StringAtom Name
human readable name of a ModelNodeType
Definition
shaderidentifier.h:36
CoreGraphics::ShaderIdentifier::FromName
static Code FromName(const Name &name)
convert from string
Definition
shaderidentifier.cc:29
CoreGraphics::ShaderIdentifier::ShaderIdentifier
ShaderIdentifier()
constructor
Definition
shaderidentifier.cc:19
CoreGraphics::ShaderIdentifier::Code
IndexT Code
binary code for a ModelNodeType
Definition
shaderidentifier.h:38
CoreGraphics::ShaderIdentifier::nameToCode
Util::Dictionary< Name, IndexT > nameToCode
Definition
shaderidentifier.h:55
CoreGraphics::ShaderIdentifier::MaxNumShaderIdentifiers
static const IndexT MaxNumShaderIdentifiers
maximum number of different ModelNodeTypes
Definition
shaderidentifier.h:45
CoreGraphics::ShaderIdentifier::ToName
static Name ToName(Code c)
convert to string
Definition
shaderidentifier.cc:51
CoreGraphics::ShaderIdentifier::InvalidBatchType
static const IndexT InvalidBatchType
invalid model node type code
Definition
shaderidentifier.h:47
CoreGraphics::ShaderIdentifier::codeToName
Util::Array< Name > codeToName
Definition
shaderidentifier.h:56
Util::Array
Nebula's dynamic array class.
Definition
array.h:61
Util::Dictionary
A collection of key/value pairs with quick value retrieval by key at roughly O(log n).
Definition
dictionary.h:35
Util::StringAtom
A StringAtom.
Definition
stringatom.h:22
dictionary.h
Base
Definition
gamecontentserverbase.cc:10
CoreGraphics
Acceleration structures are used to enable ray tracing on the GPU by dividing the scene into a BVH.
Definition
accelerationstructure.h:24
stringatom.h
types.h
InvalidIndex
static const int InvalidIndex
Definition
types.h:47
IndexT
int IndexT
Definition
types.h:41
code
render
coregraphics
shaderidentifier.h
Generated on
for Nebula. Dark theme by
Tilen Majerle
. All rights reserved.