2023-12-11 08:07:56 +00:00
|
|
|
/******************************************************************************
|
|
|
|
* QSkinny - Copyright (C) 2016 Uwe Rathmann
|
|
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
*****************************************************************************/
|
|
|
|
|
2023-12-16 11:27:09 +00:00
|
|
|
#ifndef QSK_SCENE_TEXTURE_H
|
|
|
|
#define QSK_SCENE_TEXTURE_H
|
2023-12-11 08:07:56 +00:00
|
|
|
|
2023-12-16 11:27:09 +00:00
|
|
|
#include "QskGlobal.h"
|
2023-12-11 08:07:56 +00:00
|
|
|
#include <qsgtexture.h>
|
|
|
|
|
2023-12-16 11:27:09 +00:00
|
|
|
class QskSceneTexturePrivate;
|
2023-12-11 08:07:56 +00:00
|
|
|
|
|
|
|
class QSGRootNode;
|
|
|
|
class QSGTransformNode;
|
2023-12-17 14:54:53 +00:00
|
|
|
class QQuickWindow;
|
2023-12-11 08:07:56 +00:00
|
|
|
|
2023-12-17 15:20:20 +00:00
|
|
|
class QSK_EXPORT QskSceneTexture : public QSGTexture
|
2023-12-11 08:07:56 +00:00
|
|
|
{
|
2023-12-16 11:27:09 +00:00
|
|
|
Q_OBJECT
|
|
|
|
|
2023-12-11 08:07:56 +00:00
|
|
|
using Inherited = QSGTexture;
|
|
|
|
|
|
|
|
public:
|
2023-12-17 14:54:53 +00:00
|
|
|
QskSceneTexture( const QQuickWindow* );
|
2023-12-16 11:27:09 +00:00
|
|
|
~QskSceneTexture();
|
2023-12-11 08:07:56 +00:00
|
|
|
|
2023-12-17 14:54:53 +00:00
|
|
|
void render( const QSGRootNode*, const QSGTransformNode*, const QRectF& );
|
2023-12-11 08:07:56 +00:00
|
|
|
|
|
|
|
QSize textureSize() const override;
|
|
|
|
|
|
|
|
qint64 comparisonKey() const override;
|
|
|
|
QRhiTexture* rhiTexture() const override;
|
|
|
|
|
|
|
|
QRectF normalizedTextureSubRect() const override;
|
|
|
|
|
2023-12-13 06:27:40 +00:00
|
|
|
// satisfy the QSGTexture API
|
2023-12-16 11:27:09 +00:00
|
|
|
bool hasAlphaChannel() const override;
|
|
|
|
bool hasMipmaps() const override;
|
|
|
|
void commitTextureOperations( QRhi*, QRhiResourceUpdateBatch* ) override;
|
2023-12-11 08:07:56 +00:00
|
|
|
|
2023-12-16 11:27:09 +00:00
|
|
|
Q_SIGNALS:
|
|
|
|
void updateRequested();
|
|
|
|
|
|
|
|
private:
|
|
|
|
Q_DECLARE_PRIVATE( QskSceneTexture )
|
2023-12-11 08:07:56 +00:00
|
|
|
};
|
2023-12-16 11:27:09 +00:00
|
|
|
|
|
|
|
#endif
|