Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
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
5
6const char *QSSGCommand::typeAsString() const
7{
8 switch (m_type) {
10 return "Unknown";
12 return "AllocateBuffer";
14 return "BindTarget";
16 return "BindBuffer";
18 return "BindShader";
20 return "ApplyInstanceValue";
22 return "ApplyBufferValue";
24 return "Render";
26 return "ApplyValue";
27 default:
28 break;
29 }
30 return "";
31}
32
34{
35 QString result;
36 QDebug stream(&result);
37
38 switch (m_type) {
40 static_cast<const QSSGAllocateBuffer*>(this)->addDebug(stream);
41 break;
43 static_cast<const QSSGBindTarget*>(this)->addDebug(stream);
44 break;
46 static_cast<const QSSGBindBuffer*>(this)->addDebug(stream);
47 break;
49 static_cast<const QSSGBindShader*>(this)->addDebug(stream);
50 break;
52 static_cast<const QSSGApplyInstanceValue*>(this)->addDebug(stream);
53 break;
55 static_cast<const QSSGApplyBufferValue*>(this)->addDebug(stream);
56 break;
58 static_cast<const QSSGRender*>(this)->addDebug(stream);
59 break;
61 static_cast<const QSSGApplyValue*>(this)->addDebug(stream);
62 break;
64 default:
65 addDebug(stream);
66 break;
67 }
68
69 return result;
70}
71
72void QSSGCommand::addDebug(QDebug &stream) const
73{
74 stream << "No debug info for " << typeAsString();
75}
const char * typeAsString() const
void addDebug(QDebug &stream) const
QString debugString() const