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
qsgdefaultspritenode_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// Qt-Security score:significant reason:default
4
5#ifndef QSGDEFAULTSPRITENODE_H
6#define QSGDEFAULTSPRITENODE_H
7
8//
9// W A R N I N G
10// -------------
11//
12// This file is not part of the Qt API. It exists purely as an
13// implementation detail. This header file may change from version to
14// version without notice, or even be removed.
15//
16// We mean it.
17//
18
19#include <private/qtquickglobal_p.h>
20
22
23#include <private/qsgadaptationlayer_p.h>
24
25QT_BEGIN_NAMESPACE
26class QQuickSpriteMaterial;
28{
29public:
31
32 void setTexture(QSGTexture *texture) override;
33 void setTime(float time) override;
34 void setSourceA(const QPoint &source) override;
35 void setSourceB(const QPoint &source) override;
36 void setSpriteSize(const QSize &size) override;
37 void setSheetSize(const QSize &size) override;
38 void setSize(const QSizeF &size) override;
39 void setFiltering(QSGTexture::Filtering filtering) override;
40 void update() override;
41private:
42 void updateGeometry();
43
44 QQuickSpriteMaterial *m_material;
45 QSGGeometry *m_geometry;
46 bool m_geometryDirty;
47 QPoint m_sourceA;
48 QPoint m_sourceB;
49 QSize m_spriteSize;
50 QSize m_sheetSize;
51 QSizeF m_size;
52};
53
54QT_END_NAMESPACE
55
56#endif // QSGDEFAULTSPRITENODE_H
QSGMaterialShader * createShader(QSGRendererInterface::RenderMode renderMode) const override
This function returns a new instance of a the QSGMaterialShader implementation used to render geometr...
QSGMaterialType * type() const override
This function is called by the scene graph to query an identifier that is unique to the QSGMaterialSh...
void setTexture(QSGTexture *texture) override
void setSheetSize(const QSize &size) override
void setSourceA(const QPoint &source) override
void setSize(const QSizeF &size) override
void setSpriteSize(const QSize &size) override
void setSourceB(const QPoint &source) override
void setTime(float time) override
void setFiltering(QSGTexture::Filtering filtering) override
bool updateUniformData(RenderState &state, QSGMaterial *newMaterial, QSGMaterial *oldMaterial) override
This function is called by the scene graph to get the contents of the shader program's uniform buffer...
void updateSampledImage(RenderState &state, int binding, QSGTexture **texture, QSGMaterial *newMaterial, QSGMaterial *oldMaterial) override
This function is called by the scene graph to prepare use of sampled images in the shader,...
Combined button and popup list for selecting options.
QT_REQUIRE_CONFIG(quick_sprite)
static QSGGeometry::Attribute Sprite_Attributes[]
static QSGGeometry::AttributeSet Sprite_AttributeSet