Nebula
Toggle main menu visibility
Loading...
Searching...
No Matches
framebatchtype.h
Go to the documentation of this file.
1
#pragma once
2
//------------------------------------------------------------------------------
13
//------------------------------------------------------------------------------
14
#include "
core/types.h
"
15
#include "
util/string.h
"
16
17
namespace
Frame
18
{
19
class
FrameBatchType
20
{
21
public
:
23
enum
Code
24
{
25
Depth
,
26
Solid
,
27
Alpha
,
28
Geometry
,
// most models and stuff in here
29
Shapes
,
// ShapeRenderer shapes
30
Text
,
// TextRenderer elements
31
UI
,
// user interface stuff
32
ResolveDepthBuffer
,
// resolve depth buffer to texture
33
MousePointers
,
// MousePointers
34
Lights
,
// render lights
35
LightProbes
,
// render light probes
36
System
,
// called by the system
37
38
InvalidBatchType
39
};
40
42
static
FrameBatchType::Code
FromString
(
const
Util::String
& str);
44
static
Util::String
ToString
(
FrameBatchType::Code
c);
45
};
46
47
//------------------------------------------------------------------------------
50
inline
FrameBatchType::Code
51
FrameBatchType::FromString
(
const
Util::String
& str)
52
{
53
if
(str ==
"Depth"
)
return
Depth
;
54
else
if
(str ==
"Solid"
)
return
Solid
;
55
else
if
(str ==
"Alpha"
)
return
Alpha
;
56
else
if
(str ==
"Geometry"
)
return
Geometry
;
57
else
if
(str ==
"Shapes"
)
return
Shapes
;
58
else
if
(str ==
"Text"
)
return
Text
;
59
else
if
(str ==
"UI"
)
return
UI
;
60
else
if
(str ==
"ResolveDepthBuffer"
)
return
ResolveDepthBuffer
;
61
else
if
(str ==
"MousePointers"
)
return
MousePointers
;
62
else
if
(str ==
"Lights"
)
return
Lights
;
63
else
if
(str ==
"LightProbes"
)
return
LightProbes
;
64
else
65
{
66
n_error
(
"BatchType::FromString(): invalid string '%s'!"
, str.
AsCharPtr
());
67
return
InvalidBatchType
;
68
}
69
}
70
71
//------------------------------------------------------------------------------
74
inline
Util::String
75
FrameBatchType::ToString
(
FrameBatchType::Code
c)
76
{
77
switch
(c)
78
{
79
case
Depth
:
return
"Depth"
;
80
case
Solid
:
return
"Solid"
;
81
case
Alpha
:
return
"Alpha"
;
82
case
Geometry
:
return
"Geometry"
;
83
case
Shapes
:
return
"Shapes"
;
84
case
Text
:
return
"Text"
;
85
case
UI
:
return
"UI"
;
86
case
ResolveDepthBuffer
:
return
"ResolveDepthBuffer"
;
87
case
MousePointers
:
return
"MousePointers"
;
88
case
Lights
:
return
"Lights"
;
89
case
LightProbes
:
return
"LightProbes"
;
90
default
:
91
n_error
(
"BatchType::ToString(): invalid batch type!"
);
92
return
""
;
93
}
94
}
95
96
}
// namespace Frame
97
//------------------------------------------------------------------------------
98
99
Frame::FrameBatchType
Frame batch type hints for the render device and render targets.
Definition
framebatchtype.h:20
Frame::FrameBatchType::FromString
static FrameBatchType::Code FromString(const Util::String &str)
convert from string
Definition
framebatchtype.h:51
Frame::FrameBatchType::Code
Code
batch type enum
Definition
framebatchtype.h:24
Frame::FrameBatchType::InvalidBatchType
@ InvalidBatchType
Definition
framebatchtype.h:38
Frame::FrameBatchType::MousePointers
@ MousePointers
Definition
framebatchtype.h:33
Frame::FrameBatchType::ResolveDepthBuffer
@ ResolveDepthBuffer
Definition
framebatchtype.h:32
Frame::FrameBatchType::LightProbes
@ LightProbes
Definition
framebatchtype.h:35
Frame::FrameBatchType::Geometry
@ Geometry
Definition
framebatchtype.h:28
Frame::FrameBatchType::Solid
@ Solid
Definition
framebatchtype.h:26
Frame::FrameBatchType::Depth
@ Depth
Definition
framebatchtype.h:25
Frame::FrameBatchType::Shapes
@ Shapes
Definition
framebatchtype.h:29
Frame::FrameBatchType::Lights
@ Lights
Definition
framebatchtype.h:34
Frame::FrameBatchType::Alpha
@ Alpha
Definition
framebatchtype.h:27
Frame::FrameBatchType::Text
@ Text
Definition
framebatchtype.h:30
Frame::FrameBatchType::UI
@ UI
Definition
framebatchtype.h:31
Frame::FrameBatchType::ToString
static Util::String ToString(FrameBatchType::Code c)
convert to string
Definition
framebatchtype.h:75
n_error
void __cdecl n_error(const char *msg,...)
This function is called when a serious situation is encountered which requires abortion of the applic...
Definition
debug.cc:138
Frame
ImGUI debug interface for inspecting frame scripts.
Definition
shaderserverbase.h:52
System
Definition
osxsysfunc.h:15
string.h
Util.String
Nebula's universal string class.
Definition
String.cs:8
Util.String::AsCharPtr
const char * AsCharPtr() const
return contents as character pointer
Definition
string.h:572
types.h
code
render
frame
framebatchtype.h
Generated on
for Nebula. Dark theme by
Tilen Majerle
. All rights reserved.