diff options
Diffstat (limited to 'src/scenegraph/coreapi/qsgcontext.cpp')
-rw-r--r-- | src/scenegraph/coreapi/qsgcontext.cpp | 61 |
1 files changed, 31 insertions, 30 deletions
diff --git a/src/scenegraph/coreapi/qsgcontext.cpp b/src/scenegraph/coreapi/qsgcontext.cpp index a4632bb..a2fe816 100644 --- a/src/scenegraph/coreapi/qsgcontext.cpp +++ b/src/scenegraph/coreapi/qsgcontext.cpp @@ -6,17 +6,18 @@ #include "default/default_rectanglenode.h" #include "default/default_texturenode.h" #include "default/default_glyphnode.h" -#include "threadedtexturemanager.h" + +#include "qsgtexturemanager.h" #include <QApplication> -#ifdef Q_WS_MAC -#include "mactexturemanager.h" -#endif +//#ifdef Q_WS_MAC +//#include "mactexturemanager.h" +//#endif -#ifdef Q_WS_QPA -#include "qsgeglfsthreadedtexturemanager.h" -#endif +//#ifdef Q_WS_QPA +//#include "qsgeglfsthreadedtexturemanager.h" +//#endif #include <private/qobject_p.h> @@ -32,7 +33,7 @@ public: RootNode *rootNode; Renderer *renderer; - TextureManager *textureManager; + QSGTextureManager *textureManager; QGLContext *gl; }; @@ -112,7 +113,7 @@ void QSGContext::initialize(QGLContext *context) texture manager is constructed through one call to createTextureManager() during the scene graph context's initialization */ -TextureManager *QSGContext::textureManager() const +QSGTextureManager *QSGContext::textureManager() const { Q_D(const QSGContext); return d->textureManager; @@ -167,28 +168,28 @@ Renderer *QSGContext::createRenderer() /*! Factory function for the texture manager to be used for this scene graph. */ -TextureManager *QSGContext::createTextureManager() +QSGTextureManager *QSGContext::createTextureManager() { QStringList args = qApp->arguments(); - if (args.contains("--basic-texture-manager")) { - printf("QSGContext: Using basic texture manager\n"); - return new TextureManager; - } else if (args.contains("--threaded-texture-manager")) { - printf("QSGContext: Using threaded texture manager\n"); - return new QSGThreadedTextureManager; - } - -#if defined (Q_WS_MAC) - printf("QSGContext:: Using Mac Texture manager\n"); - return new QSGMacTextureManager; -#elif defined (Q_WS_WIN) - printf("QSGContext:: Using Threaded Texture Manager\n"); - return new QSGThreadedTextureManager; -#elif defined (Q_WS_QPA) - printf("QSGContext:: Using EglFS Threaded Texture Manager\n"); - return new QSGEglFSThreadedTextureManager; -#endif - - return new TextureManager; +// if (args.contains("--basic-texture-manager")) { +// printf("QSGContext: Using basic texture manager\n"); + return new QSGTextureManager; +// } else if (args.contains("--threaded-texture-manager")) { +// printf("QSGContext: Using threaded texture manager\n"); +// return new QSGThreadedTextureManager; +// } + +//#if defined (Q_WS_MAC) +// printf("QSGContext:: Using Mac Texture manager\n"); +// return new QSGMacTextureManager; +//#elif defined (Q_WS_WIN) +// printf("QSGContext:: Using Threaded Texture Manager\n"); +// return new QSGThreadedTextureManager; +//#elif defined (Q_WS_QPA) +// printf("QSGContext:: Using EglFS Threaded Texture Manager\n"); +// return new QSGEglFSThreadedTextureManager; +//#endif + +// return new TextureManager; } |