diff options
author | Simon Hausmann <simon.hausmann@theqtcompany.com> | 2015-01-14 12:00:56 +0100 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@theqtcompany.com> | 2015-01-16 12:46:52 +0100 |
commit | 291aea14636a0e779d874a01630524facb1397dd (patch) | |
tree | 044ff4131a9b3f5a3edb00e6a807d0609c04a182 /examples/quick/scenegraph | |
parent | 39f1e0d66dc434e764731fbfed29c8fd98d217aa (diff) | |
parent | 88e87647c3b7d651dba2c8e61f945d47ecdd02c4 (diff) |
Merge remote-tracking branch 'origin/5.4' into dev
Conflicts:
.qmake.conf
src/qml/jsruntime/qv4context_p.h
src/qml/jsruntime/qv4debugging.cpp
src/qml/jsruntime/qv4engine.cpp
src/qml/jsruntime/qv4functionobject_p.h
src/qml/jsruntime/qv4qobjectwrapper.cpp
src/quick/scenegraph/shaders/visualization.frag
tests/auto/qml/qjsengine/tst_qjsengine.cpp
Change-Id: I492e8546c278f80a300a2129e9a29d861e144a30
Diffstat (limited to 'examples/quick/scenegraph')
-rw-r--r-- | examples/quick/scenegraph/sgengine/window.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/examples/quick/scenegraph/sgengine/window.cpp b/examples/quick/scenegraph/sgengine/window.cpp index 9af4029165..bc371a38f6 100644 --- a/examples/quick/scenegraph/sgengine/window.cpp +++ b/examples/quick/scenegraph/sgengine/window.cpp @@ -47,6 +47,7 @@ #include <QSGTransformNode> #include <QScreen> #include <QVariantAnimation> +#include <QOpenGLFunctions> class Item { public: @@ -213,13 +214,14 @@ void Window::initialize() m_sgRenderer->setClearColor(QColor(32, 32, 32)); // With QSGEngine::createTextureFromId + QOpenGLFunctions glFuncs(m_context.data()); GLuint glTexture; - glGenTextures(1, &glTexture); - glBindTexture(GL_TEXTURE_2D, glTexture); + glFuncs.glGenTextures(1, &glTexture); + glFuncs.glBindTexture(GL_TEXTURE_2D, glTexture); QImage smile = QImage(":/scenegraph/sgengine/face-smile.png").scaled(48, 48, Qt::KeepAspectRatio, Qt::SmoothTransformation); smile = smile.convertToFormat(QImage::Format_RGBA8888_Premultiplied); Q_ASSERT(!smile.isNull()); - glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, smile.width(), smile.height(), 0, GL_RGBA, GL_UNSIGNED_BYTE, smile.constBits()); + glFuncs.glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, smile.width(), smile.height(), 0, GL_RGBA, GL_UNSIGNED_BYTE, smile.constBits()); m_smileTexture.reset(m_sgEngine->createTextureFromId(glTexture, smile.size(), QFlag(QSGEngine::TextureOwnsGLTexture | QSGEngine::TextureHasAlphaChannel))); // With QSGEngine::createTextureFromImage |