Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
qsgdefaultcontext_p.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 QSGDEFAULTCONTEXT_H
5#define QSGDEFAULTCONTEXT_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <QtQuick/private/qsgcontext_p.h>
19#include <QtQuick/private/qsgdistancefieldglyphnode_p.h>
21
23
24class Q_QUICK_PRIVATE_EXPORT QSGDefaultContext : public QSGContext, public QSGRendererInterface
25{
26public:
29
30 void renderContextInitialized(QSGRenderContext *renderContext) override;
36 QSGGlyphNode *createGlyphNode(QSGRenderContext *rc, bool preferNativeGlyphNode, int renderTypeQuality) override;
37 QSGLayer *createLayer(QSGRenderContext *renderContext) override;
38 QSurfaceFormat defaultSurfaceFormat() const override;
41 QSGImageNode *createImageNode() override;
43#if QT_CONFIG(quick_sprite)
44 QSGSpriteNode *createSpriteNode() override;
45#endif
48
49 void setDistanceFieldEnabled(bool enabled);
50 bool isDistanceFieldEnabled() const;
51
52 GraphicsApi graphicsApi() const override;
53 void *getResource(QQuickWindow *window, Resource resource) const override;
54 ShaderType shaderType() const override;
55 ShaderCompilationTypes shaderCompilationType() const override;
56 ShaderSourceTypes shaderSourceType() const override;
57
58private:
59 QMutex m_mutex;
60 QSGContext::AntialiasingMethod m_antialiasingMethod;
61 bool m_distanceFieldDisabled;
62 QSGDistanceFieldGlyphNode::AntialiasingMode m_distanceFieldAntialiasing;
63 bool m_distanceFieldAntialiasingDecided;
64};
65
67
68#endif // QSGDEFAULTCONTEXT_H
\inmodule QtCore
Definition qmutex.h:285
\inmodule QtCore
Definition qobject.h:90
The QQuickPaintedItem class provides a way to use the QPainter API in the QML Scene Graph.
\qmltype Window \instantiates QQuickWindow \inqmlmodule QtQuick
The QSGContext holds the scene graph entry points for one QML engine.
virtual void renderContextInitialized(QSGRenderContext *renderContext)
virtual QSGPainterNode * createPainterNode(QQuickPaintedItem *item)=0
virtual QSGShaderEffectNode * createShaderEffectNode(QSGRenderContext *renderContext)
Creates a new shader effect node.
virtual QSGRendererInterface * rendererInterface(QSGRenderContext *renderContext)
Returns a pointer to the (presumably) global renderer interface.
virtual QSGInternalRectangleNode * createInternalRectangleNode()=0
virtual QSGInternalImageNode * createInternalImageNode(QSGRenderContext *renderContext)=0
virtual QSGRectangleNode * createRectangleNode()=0
virtual QSGGlyphNode * createGlyphNode(QSGRenderContext *rc, bool preferNativeGlyphNode, int renderTypeQuality)=0
virtual QSGRenderContext * createRenderContext()=0
virtual QSurfaceFormat defaultSurfaceFormat() const =0
virtual QSGGuiThreadShaderEffectManager * createGuiThreadShaderEffectManager()
Creates a new shader effect helper instance.
virtual QSGLayer * createLayer(QSGRenderContext *renderContext)=0
virtual QSGNinePatchNode * createNinePatchNode()=0
virtual void renderContextInvalidated(QSGRenderContext *renderContext)
virtual QSGImageNode * createImageNode()=0
The QSGImageNode class is provided for convenience to easily draw textured content using the QML scen...
\inmodule QtQuick
The QSGRectangleNode class is a convenience class for drawing solid filled rectangles using scenegrap...
An interface providing access to some of the graphics API specific internals of the scenegraph.
Resource
\value DeviceResource The resource is a pointer to the graphics device, when applicable.
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 void * getResource(QQuickWindow *window, Resource resource) const
Queries a graphics resource in window.
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...
The QSurfaceFormat class represents the format of a QSurface. \inmodule QtGui.
Combined button and popup list for selecting options.
GLenum GLenum GLsizei const GLuint GLboolean enabled
QGraphicsItem * item
aWidget window() -> setWindowTitle("New Window Title")
[2]
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent