qskinny/src/nodes/QskSceneTexture.h

50 lines
1.2 KiB
C
Raw Normal View History

/******************************************************************************
* 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-16 11:27:09 +00:00
#include "QskGlobal.h"
#include <qsgtexture.h>
2023-12-16 11:27:09 +00:00
class QskSceneTexturePrivate;
class QSGRootNode;
class QSGTransformNode;
2023-12-17 14:54:53 +00:00
class QQuickWindow;
2023-12-17 15:20:20 +00:00
class QSK_EXPORT QskSceneTexture : public QSGTexture
{
2023-12-16 11:27:09 +00:00
Q_OBJECT
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-17 14:54:53 +00:00
void render( const QSGRootNode*, const QSGTransformNode*, const QRectF& );
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-16 11:27:09 +00:00
Q_SIGNALS:
void updateRequested();
private:
Q_DECLARE_PRIVATE( QskSceneTexture )
};
2023-12-16 11:27:09 +00:00
#endif