class QQuickItem;
class QSGEngine;
+class QSGTexture;
class QQuickCanvasPrivate;
class QOpenGLFramebufferObject;
class QDeclarativeIncubationController;
Q_OBJECT
Q_DECLARE_PRIVATE(QQuickCanvas)
public:
+ enum CreateTextureOption {
+ TextureHasAlphaChannel = 0x0001,
+ TextureHasMipmaps = 0x0002,
+ TextureOwnsGLTexture = 0x0004
+ };
+
+ Q_DECLARE_FLAGS(CreateTextureOptions, CreateTextureOption)
+
QQuickCanvas(QWindow *parent = 0);
virtual ~QQuickCanvas();
QDeclarativeIncubationController *incubationController() const;
+ // Scene graph specific functions
+ QSGTexture *createTextureFromImage(const QImage &image) const;
+ QSGTexture *createTextureFromId(uint id, const QSize &size, CreateTextureOptions options = CreateTextureOption(0)) const;
+
+ void setClearBeforeRendering(bool enabled);
+ bool clearBeforeRendering() const;
+
+ void setClearColor(const QColor &color);
+ QColor clearColor() const;
+
+ QOpenGLContext *openglContext() const;
+
Q_SIGNALS:
void frameSwapped();
void sceneGraphInitialized();
+ void beforeRendering();
+ void afterRendering();
protected:
QQuickCanvas(QQuickCanvasPrivate &dd, QWindow *parent = 0);