/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
**
-** This file is part of the QtDeclarative module of the Qt Toolkit.
+** This file is part of the QtQml module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** GNU Lesser General Public License Usage
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
#include <private/qrawfont_p.h>
#include <QtQuick/qsgnode.h>
+#include <QtQuick/private/qsgdepthstencilbuffer_p.h>
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
+
class QSGContextPrivate;
class QSGRectangleNode;
class QSGImageNode;
class QSGGlyphNode;
class QSGRenderer;
class QSGDistanceFieldGlyphCache;
-
+class QQuickCanvas;
class QSGTexture;
class QSGMaterial;
class QSGMaterialShader;
-class QSGEngine;
+class QQuickWindowManager;
class QOpenGLContext;
class QOpenGLFramebufferObject;
-class QDeclarativeTextureFactory;
+class QQuickTextureFactory;
class Q_QUICK_EXPORT QSGContext : public QObject
{
~QSGContext();
virtual void initialize(QOpenGLContext *context);
-
- QSGRenderer *renderer() const;
-
- void setRootNode(QSGRootNode *node);
- QSGRootNode *rootNode() const;
+ virtual void invalidate();
QOpenGLContext *glContext() const;
QSGMaterialShader *prepareMaterial(QSGMaterial *material);
- virtual void renderNextFrame(QOpenGLFramebufferObject *fbo = 0);
+ virtual void renderNextFrame(QSGRenderer *renderer, GLuint fboId);
- virtual QSGDistanceFieldGlyphCache *createDistanceFieldGlyphCache(const QRawFont &font);
+ virtual QSGDistanceFieldGlyphCache *distanceFieldGlyphCache(const QRawFont &font);
virtual QSGRectangleNode *createRectangleNode();
virtual QSGImageNode *createImageNode();
virtual QSGGlyphNode *createGlyphNode();
virtual QSGRenderer *createRenderer();
- virtual bool canDecodeImageToTexture() const;
- virtual QSGTexture *decodeImageToTexture(QIODevice *dev,
- QSize *size,
- const QSize &requestSize);
virtual QSGTexture *createTexture(const QImage &image = QImage()) const;
virtual QSize minimumFBOSize() const;
+ virtual QSharedPointer<QSGDepthStencilBuffer> depthStencilBufferForFbo(QOpenGLFramebufferObject *fbo);
+ QSGDepthStencilBufferManager *depthStencilBufferManager();
virtual QSurfaceFormat defaultSurfaceFormat() const;
- QSGTexture *textureForFactory(QDeclarativeTextureFactory *factory);
+ QSGTexture *textureForFactory(QQuickTextureFactory *factory, QQuickCanvas *canvas);
static QSGContext *createDefaultContext();
virtual QAnimationDriver *createAnimationDriver(QObject *parent);
-signals:
- void ready();
+ static QQuickTextureFactory *createTextureFactoryFromImage(const QImage &image);
+ static QQuickWindowManager *createWindowManager();
+
public slots:
void textureFactoryDestroyed(QObject *o);
+
+signals:
+ void initialized();
+ void invalidated();
};
QT_END_NAMESPACE