QSkinny 0.8.0
C++/Qt UI toolkit
Loading...
Searching...
No Matches
QskSceneTexture.h
1/******************************************************************************
2 * QSkinny - Copyright (C) The authors
3 * SPDX-License-Identifier: BSD-3-Clause
4 *****************************************************************************/
5
6#ifndef QSK_SCENE_TEXTURE_H
7#define QSK_SCENE_TEXTURE_H
8
9#include "QskGlobal.h"
10#include <qsgtexture.h>
11
12class QskSceneTexturePrivate;
13
14class QSGRootNode;
15class QSGTransformNode;
16class QQuickWindow;
17
18class QSK_EXPORT QskSceneTexture : public QSGTexture
19{
20 Q_OBJECT
21
22 using Inherited = QSGTexture;
23
24 public:
25 QskSceneTexture( const QQuickWindow* );
27
28 void render( const QSGRootNode*, const QSGTransformNode*, const QRectF& );
29
30 QSize textureSize() const override;
31
32#if QT_VERSION < QT_VERSION_CHECK( 6, 0, 0 )
33 void bind() override;
34 int textureId() const override;
35#else
36 qint64 comparisonKey() const override;
37 QRhiTexture* rhiTexture() const override;
38#endif
39
40 QRectF normalizedTextureSubRect() const override;
41
42 // satisfy the QSGTexture API
43 bool hasAlphaChannel() const override;
44 bool hasMipmaps() const override;
45
46 bool isDirty() const;
47
48 Q_SIGNALS:
49 void updateRequested();
50
51 private:
52 Q_DECLARE_PRIVATE( QskSceneTexture )
53};
54
55#endif