Qt
6.x
The Qt SDK
Loading...
Searching...
No Matches
qssgrendercommands.cpp
Go to the documentation of this file.
1
// Copyright (C) 2020 The Qt Company Ltd.
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
4
#include "
qssgrendercommands_p.h
"
5
6
const
char
*
QSSGCommand::typeAsString
()
const
7
{
8
switch
(
m_type
) {
9
case
CommandType::Unknown
:
10
return
"Unknown"
;
11
case
CommandType::AllocateBuffer
:
12
return
"AllocateBuffer"
;
13
case
CommandType::BindTarget
:
14
return
"BindTarget"
;
15
case
CommandType::BindBuffer
:
16
return
"BindBuffer"
;
17
case
CommandType::BindShader
:
18
return
"BindShader"
;
19
case
CommandType::ApplyInstanceValue
:
20
return
"ApplyInstanceValue"
;
21
case
CommandType::ApplyBufferValue
:
22
return
"ApplyBufferValue"
;
23
case
CommandType::Render
:
24
return
"Render"
;
25
case
CommandType::ApplyValue
:
26
return
"ApplyValue"
;
27
default
:
28
break
;
29
}
30
return
""
;
31
}
32
33
QString
QSSGCommand::debugString
()
const
34
{
35
QString
result
;
36
QDebug
stream
(&
result
);
37
38
switch
(
m_type
) {
39
case
CommandType::AllocateBuffer
:
40
static_cast<
const
QSSGAllocateBuffer
*
>
(
this
)->
addDebug
(
stream
);
41
break
;
42
case
CommandType::BindTarget
:
43
static_cast<
const
QSSGBindTarget
*
>
(
this
)->
addDebug
(
stream
);
44
break
;
45
case
CommandType::BindBuffer
:
46
static_cast<
const
QSSGBindBuffer
*
>
(
this
)->
addDebug
(
stream
);
47
break
;
48
case
CommandType::BindShader
:
49
static_cast<
const
QSSGBindShader
*
>
(
this
)->
addDebug
(
stream
);
50
break
;
51
case
CommandType::ApplyInstanceValue
:
52
static_cast<
const
QSSGApplyInstanceValue
*
>
(
this
)->
addDebug
(
stream
);
53
break
;
54
case
CommandType::ApplyBufferValue
:
55
static_cast<
const
QSSGApplyBufferValue
*
>
(
this
)->
addDebug
(
stream
);
56
break
;
57
case
CommandType::Render
:
58
static_cast<
const
QSSGRender
*
>
(
this
)->
addDebug
(
stream
);
59
break
;
60
case
CommandType::ApplyValue
:
61
static_cast<
const
QSSGApplyValue
*
>
(
this
)->
addDebug
(
stream
);
62
break
;
63
case
CommandType::Unknown
:
64
default
:
65
addDebug
(
stream
);
66
break
;
67
}
68
69
return
result
;
70
}
71
72
void
QSSGCommand::addDebug
(
QDebug
&
stream
)
const
73
{
74
stream
<<
"No debug info for "
<<
typeAsString
();
75
}
QDebug
\inmodule QtCore
QString
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition
qstring.h:127
stream
EGLStreamKHR stream
Definition
qeglstreamconvenience_p.h:67
result
GLuint64EXT * result
[6]
Definition
qopenglext.h:10932
qssgrendercommands_p.h
CommandType::BindBuffer
@ BindBuffer
CommandType::BindTarget
@ BindTarget
CommandType::Render
@ Render
CommandType::Unknown
@ Unknown
CommandType::ApplyValue
@ ApplyValue
CommandType::BindShader
@ BindShader
CommandType::ApplyBufferValue
@ ApplyBufferValue
CommandType::AllocateBuffer
@ AllocateBuffer
CommandType::ApplyInstanceValue
@ ApplyInstanceValue
QSSGAllocateBuffer
Definition
qssgrendercommands_p.h:68
QSSGApplyBufferValue
Definition
qssgrendercommands_p.h:177
QSSGApplyInstanceValue
Definition
qssgrendercommands_p.h:140
QSSGApplyValue
Definition
qssgrendercommands_p.h:162
QSSGBindBuffer
Definition
qssgrendercommands_p.h:110
QSSGBindShader
Definition
qssgrendercommands_p.h:122
QSSGBindTarget
Definition
qssgrendercommands_p.h:97
QSSGCommand::typeAsString
const char * typeAsString() const
Definition
qssgrendercommands.cpp:6
QSSGCommand::addDebug
void addDebug(QDebug &stream) const
Definition
qssgrendercommands.cpp:72
QSSGCommand::m_type
CommandType m_type
Definition
qssgrendercommands_p.h:44
QSSGCommand::debugString
QString debugString() const
Definition
qssgrendercommands.cpp:33
QSSGRender
Definition
qssgrendercommands_p.h:191
qtquick3d
src
runtimerender
qssgrendercommands.cpp
Generated by
1.9.7