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
qsgrendererinterface.h
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QSGRENDERERINTERFACE_H
5#define QSGRENDERERINTERFACE_H
6
7#include <QtQuick/qsgnode.h>
8
10
11class QQuickWindow;
12
13class Q_QUICK_EXPORT QSGRendererInterface
14{
15public:
26
27 OpenGLRhi = OpenGL,
28 Direct3D11Rhi = Direct3D11,
29 VulkanRhi = Vulkan,
30 MetalRhi = Metal,
31 NullRhi = Null
32 };
33
53
60
62 RuntimeCompilation = 0x01,
63 OfflineCompilation = 0x02
64 };
65 Q_DECLARE_FLAGS(ShaderCompilationTypes, ShaderCompilationType)
66
68 ShaderSourceString = 0x01,
69 ShaderSourceFile = 0x02,
70 ShaderByteCode = 0x04
71 };
72 Q_DECLARE_FLAGS(ShaderSourceTypes, ShaderSourceType)
73
79
80 virtual ~QSGRendererInterface();
81
82 virtual GraphicsApi graphicsApi() const = 0;
83
84 virtual void *getResource(QQuickWindow *window, Resource resource) const;
85 virtual void *getResource(QQuickWindow *window, const char *resource) const;
86
87 virtual ShaderType shaderType() const = 0;
88 virtual ShaderCompilationTypes shaderCompilationType() const = 0;
89 virtual ShaderSourceTypes shaderSourceType() const = 0;
90
91 static bool isApiRhiBased(GraphicsApi api);
92};
93
94Q_DECLARE_OPERATORS_FOR_FLAGS(QSGRendererInterface::ShaderCompilationTypes)
95Q_DECLARE_OPERATORS_FOR_FLAGS(QSGRendererInterface::ShaderSourceTypes)
96
98
99#endif
\qmltype Window \instantiates QQuickWindow \inqmlmodule QtQuick
An interface providing access to some of the graphics API specific internals of the scenegraph.
RenderMode
\value RenderMode2D Normal 2D rendering \value RenderMode2DNoDepthBuffer Normal 2D rendering with dep...
ShaderSourceType
\value ShaderSourceString Shader source can be provided as a string in the corresponding properties o...
Resource
\value DeviceResource The resource is a pointer to the graphics device, when applicable.
ShaderCompilationType
\value RuntimeCompilation Runtime compilation of shader source code is supported \value OfflineCompil...
virtual ShaderType shaderType() const =0
virtual ShaderCompilationTypes shaderCompilationType() const =0
virtual GraphicsApi graphicsApi() const =0
Returns the graphics API that is in use by the Qt Quick scenegraph.
virtual ShaderSourceTypes shaderSourceType() const =0
GraphicsApi
\value Unknown An unknown graphics API is in use \value Software The Qt Quick 2D Renderer is in use \...
ShaderType
\value UnknownShadingLanguage Not yet known due to no window and scenegraph associated \value GLSL GL...
Combined button and popup list for selecting options.
#define Q_DECLARE_FLAGS(Flags, Enum)
Definition qflags.h:174
#define Q_DECLARE_OPERATORS_FOR_FLAGS(Flags)
Definition qflags.h:194
aWidget window() -> setWindowTitle("New Window Title")
[2]
QNetworkRequestFactory api
[0]