qskinny/src/nodes/QskTextureRenderer.h

43 lines
1.1 KiB
C
Raw Normal View History

/******************************************************************************
* QSkinny - Copyright (C) 2016 Uwe Rathmann
* This file may be used under the terms of the QSkinny License, Version 1.0
*****************************************************************************/
#ifndef QSK_TEXTURE_RENDERER_H
#define QSK_TEXTURE_RENDERER_H
#include "QskGlobal.h"
class QSize;
class QPainter;
2020-11-01 10:43:16 +01:00
class QSGTexture;
class QQuickWindow;
namespace QskTextureRenderer
{
class PaintHelper
{
public:
2022-03-24 17:12:34 +01:00
PaintHelper() = default;
virtual ~PaintHelper() = default;
virtual void paint( QPainter*, const QSize& ) = 0;
2022-03-24 17:12:34 +01: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