Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qssgrendergraphobject.cpp
Go to the documentation of this file.
1// Copyright (C) 2008-2012 NVIDIA Corporation.
2// Copyright (C) 2019 The Qt Company Ltd.
3// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
4
5
7
9
11{
13#define RETURN_AS_STRING(T) case T: return #T;
14 switch (type) {
15 RETURN_AS_STRING(Type::Unknown)
16 RETURN_AS_STRING(Type::Node)
17 RETURN_AS_STRING(Type::Layer)
18 RETURN_AS_STRING(Type::Joint)
19 RETURN_AS_STRING(Type::Skeleton)
20 RETURN_AS_STRING(Type::ImportScene)
21 RETURN_AS_STRING(Type::ReflectionProbe)
22 RETURN_AS_STRING(Type::DirectionalLight)
23 RETURN_AS_STRING(Type::PointLight)
24 RETURN_AS_STRING(Type::SpotLight)
25 RETURN_AS_STRING(Type::OrthographicCamera)
26 RETURN_AS_STRING(Type::PerspectiveCamera)
27 RETURN_AS_STRING(Type::CustomFrustumCamera)
28 RETURN_AS_STRING(Type::CustomCamera)
29 RETURN_AS_STRING(Type::Model)
30 RETURN_AS_STRING(Type::Item2D)
31 RETURN_AS_STRING(Type::Particles)
32 RETURN_AS_STRING(Type::SceneEnvironment)
33 RETURN_AS_STRING(Type::Effect)
34 RETURN_AS_STRING(Type::Geometry)
35 RETURN_AS_STRING(Type::TextureData)
36 RETURN_AS_STRING(Type::MorphTarget)
37 RETURN_AS_STRING(Type::ModelInstance)
38 RETURN_AS_STRING(Type::ModelBlendParticle)
39 RETURN_AS_STRING(Type::ResourceLoader)
40 RETURN_AS_STRING(Type::DefaultMaterial)
41 RETURN_AS_STRING(Type::PrincipledMaterial)
42 RETURN_AS_STRING(Type::CustomMaterial)
43 RETURN_AS_STRING(Type::SpecularGlossyMaterial)
44 RETURN_AS_STRING(Type::Skin)
45 RETURN_AS_STRING(Type::Image2D)
46 RETURN_AS_STRING(Type::ImageCube)
47 RETURN_AS_STRING(Type::RenderExtension)
48 }
49#undef RETURN_AS_STRING
50 return nullptr;
51}
52
54{
55 const bool hasGraphicsResources = ((type == QSSGRenderGraphObject::Type::Model)
57 || (type == QSSGRenderGraphObject::Type::Geometry)
58 || (type == QSSGRenderGraphObject::Type::TextureData)
59 || (type == QSSGRenderGraphObject::Type::ResourceLoader)
60 || (type == QSSGRenderGraphObject::Type::RenderExtension));
61 return hasGraphicsResources ? QSSGRenderGraphObject::FlagT(QSSGRenderGraphObject::Flags::HasGraphicsResources)
62 : 0;
63}
64
66 : type(inType)
67 , flags(flagForType(inType)) {}
68
70
71#ifndef QT_NO_DEBUG_STREAM
73{
74 dbg.nospace() << "QSSGRenderGraphObject" << '{' << asString(type) << '}';
75 return dbg;
76}
77#endif
78
\inmodule QtCore
virtual Q_QUICK3D_PROFILE_ID_ ~QSSGRenderGraphObject()
static constexpr bool isTexture(Type type) noexcept
std::underlying_type_t< Flags > FlagT
QSSGRenderGraphObject(QSSGRenderGraphObject::Type inType)
Combined button and popup list for selecting options.
GLenum type
GLbitfield flags
#define RETURN_AS_STRING(T)
QDebug operator<<(QDebug dbg, const QSSGRenderGraphObject::Type type)
static QSSGRenderGraphObject::FlagT flagForType(QSSGRenderGraphObject::Type type)
static QT_BEGIN_NAMESPACE const char * asString(QSSGRenderGraphObject::Type type)
Definition moc.h:23