qskinny/src/nodes/QskTextureRenderer.h

43 lines
1.0 KiB
C
Raw Normal View History

/******************************************************************************
2024-01-17 13:31:45 +00:00
* QSkinny - Copyright (C) The authors
2023-04-06 07:23:37 +00:00
* SPDX-License-Identifier: BSD-3-Clause
*****************************************************************************/
#ifndef QSK_TEXTURE_RENDERER_H
#define QSK_TEXTURE_RENDERER_H
#include "QskGlobal.h"
class QSize;
class QPainter;
2020-11-01 09:43:16 +00:00
class QSGTexture;
class QQuickWindow;
namespace QskTextureRenderer
{
class PaintHelper
{
public:
2022-03-24 16:12:34 +00:00
PaintHelper() = default;
virtual ~PaintHelper() = default;
virtual void paint( QPainter*, const QSize& ) = 0;
2022-03-24 16:12:34 +00:00
private:
Q_DISABLE_COPY( PaintHelper )
};
bool isOpenGLWindow( const QQuickWindow* );
void setTextureId( QQuickWindow*,
quint32 textureId, const QSize&, QSGTexture* );
quint32 createPaintedTextureGL(
QQuickWindow*, const QSize&, QskTextureRenderer::PaintHelper* );
QSK_EXPORT QSGTexture* createPaintedTexture(
QQuickWindow* window, const QSize& size, PaintHelper* helper );
}
#endif