From 50d7c049e3310d4d9194c2efb5150e4e5a50e5ca Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Thu, 24 Apr 2014 17:14:41 +0200 Subject: Follow QOpenGLContext API renaming Task-number: QTBUG-38564 Change-Id: Ice1170339f7d650fcb6accfccf325471629343d6 Reviewed-by: Sean Harmer --- src/particles/qquickcustomparticle.cpp | 4 ++-- src/particles/qquickimageparticle.cpp | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'src/particles') diff --git a/src/particles/qquickcustomparticle.cpp b/src/particles/qquickcustomparticle.cpp index c112283822..d3e5e4133f 100644 --- a/src/particles/qquickcustomparticle.cpp +++ b/src/particles/qquickcustomparticle.cpp @@ -269,7 +269,7 @@ QQuickShaderEffectNode *QQuickCustomParticle::prepareNextFrame(QQuickShaderEffec return 0; if (m_dirtyProgram) { - const bool isES = QOpenGLContext::currentContext()->isES(); + const bool isES = QOpenGLContext::currentContext()->isOpenGLES(); QQuickShaderEffectMaterial *material = static_cast(rootNode->material()); Q_ASSERT(material); @@ -311,7 +311,7 @@ QQuickShaderEffectNode *QQuickCustomParticle::prepareNextFrame(QQuickShaderEffec QQuickShaderEffectNode* QQuickCustomParticle::buildCustomNodes() { - if (QOpenGLContext::currentContext()->isES() && m_count * 4 > 0xffff) { + if (QOpenGLContext::currentContext()->isOpenGLES() && m_count * 4 > 0xffff) { printf("CustomParticle: Too many particles... \n"); return 0; } diff --git a/src/particles/qquickimageparticle.cpp b/src/particles/qquickimageparticle.cpp index f7f0b6660b..5efa7b4cca 100644 --- a/src/particles/qquickimageparticle.cpp +++ b/src/particles/qquickimageparticle.cpp @@ -100,7 +100,7 @@ public: TabledMaterial() { QSGShaderSourceBuilder builder; - const bool isES = QOpenGLContext::currentContext()->isES(); + const bool isES = QOpenGLContext::currentContext()->isOpenGLES(); builder.appendSourceFile(QStringLiteral(":/particles/shaders/imageparticle.vert")); builder.addDefinition(QByteArray(SHADER_PLATFORM_DEFINES)); @@ -178,7 +178,7 @@ public: DeformableMaterial() { QSGShaderSourceBuilder builder; - const bool isES = QOpenGLContext::currentContext()->isES(); + const bool isES = QOpenGLContext::currentContext()->isOpenGLES(); builder.appendSourceFile(QStringLiteral(":/particles/shaders/imageparticle.vert")); builder.addDefinition(QByteArray(SHADER_PLATFORM_DEFINES)); @@ -243,7 +243,7 @@ public: SpriteMaterial() { QSGShaderSourceBuilder builder; - const bool isES = QOpenGLContext::currentContext()->isES(); + const bool isES = QOpenGLContext::currentContext()->isOpenGLES(); builder.appendSourceFile(QStringLiteral(":/particles/shaders/imageparticle.vert")); builder.addDefinition(QByteArray(SHADER_PLATFORM_DEFINES)); @@ -325,7 +325,7 @@ public: ColoredMaterial() { QSGShaderSourceBuilder builder; - const bool isES = QOpenGLContext::currentContext()->isES(); + const bool isES = QOpenGLContext::currentContext()->isOpenGLES(); builder.appendSourceFile(QStringLiteral(":/particles/shaders/imageparticle.vert")); builder.addDefinition(QByteArray(SHADER_PLATFORM_DEFINES)); @@ -403,7 +403,7 @@ public: SimpleMaterial() { QSGShaderSourceBuilder builder; - const bool isES = QOpenGLContext::currentContext()->isES(); + const bool isES = QOpenGLContext::currentContext()->isOpenGLES(); builder.appendSourceFile(QStringLiteral(":/particles/shaders/imageparticle.vert")); builder.addDefinition(QByteArray(SHADER_PLATFORM_DEFINES)); @@ -1231,7 +1231,7 @@ void QQuickImageParticle::buildParticleNodes(QSGNode** passThrough) void QQuickImageParticle::finishBuildParticleNodes(QSGNode** node) { - if (QOpenGLContext::currentContext()->isES() && m_count * 4 > 0xffff) { + if (QOpenGLContext::currentContext()->isOpenGLES() && m_count * 4 > 0xffff) { printf("ImageParticle: Too many particles - maximum 16,000 per ImageParticle.\n");//ES 2 vertex count limit is ushort return; } -- cgit v1.2.3