QSkinny 0.8.0
C++/Qt UI toolkit
Loading...
Searching...
No Matches
QskTextureRenderer.h
1/******************************************************************************
2 * QSkinny - Copyright (C) The authors
3 * SPDX-License-Identifier: BSD-3-Clause
4 *****************************************************************************/
5
6#ifndef QSK_TEXTURE_RENDERER_H
7#define QSK_TEXTURE_RENDERER_H
8
9#include "QskGlobal.h"
10
11class QSize;
12class QPainter;
13class QSGTexture;
14class QQuickWindow;
15
16namespace QskTextureRenderer
17{
19 {
20 public:
21 PaintHelper() = default;
22 virtual ~PaintHelper() = default;
23
24 virtual void paint( QPainter*, const QSize& ) = 0;
25
26 private:
27 Q_DISABLE_COPY( PaintHelper )
28 };
29
30 bool isOpenGLWindow( const QQuickWindow* );
31
32 void setTextureId( QQuickWindow*,
33 quint32 textureId, const QSize&, QSGTexture* );
34
35 quint32 createPaintedTextureGL(
36 QQuickWindow*, const QSize&, QskTextureRenderer::PaintHelper* );
37
38 QSK_EXPORT QSGTexture* createPaintedTexture(
39 QQuickWindow* window, const QSize& size, PaintHelper* helper );
40}
41
42#endif