From 49d85025676a75ba8b4f31b4dccdc7c7f02e7ca5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Fri, 30 Oct 2015 10:20:42 +0100 Subject: [PATCH] [kwineffects] Runtime depend on gles in GLPlatform --- libkwineffects/kwinglplatform.cpp | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/libkwineffects/kwinglplatform.cpp b/libkwineffects/kwinglplatform.cpp index 6e5a67e292..8ea2a6dc80 100644 --- a/libkwineffects/kwinglplatform.cpp +++ b/libkwineffects/kwinglplatform.cpp @@ -542,8 +542,7 @@ void GLPlatform::detect(OpenGLPlatformInterface platformInterface) } } -#ifndef KWIN_HAVE_OPENGLES - if (m_glVersion >= kVersionNumber(3, 0)) { + if (!isGLES() && m_glVersion >= kVersionNumber(3, 0)) { int count; glGetIntegerv(GL_NUM_EXTENSIONS, &count); @@ -551,9 +550,7 @@ void GLPlatform::detect(OpenGLPlatformInterface platformInterface) const char *name = (const char *) glGetStringi(GL_EXTENSIONS, i); m_extensions.insert(name); } - } else -#endif - { + } else { const QByteArray extensions = (const char *) glGetString(GL_EXTENSIONS); m_extensions = QSet::fromList(extensions.split(' ')); } @@ -566,24 +563,22 @@ void GLPlatform::detect(OpenGLPlatformInterface platformInterface) } if (platformInterface == EglPlatformInterface) { -#ifdef KWIN_HAVE_OPENGLES - m_supportsGLSL = true; - m_textureNPOT = true; -#else - m_supportsGLSL = m_extensions.contains("GL_ARB_shader_objects") && - m_extensions.contains("GL_ARB_fragment_shader") && - m_extensions.contains("GL_ARB_vertex_shader"); + if (isGLES()) { + m_supportsGLSL = true; + m_textureNPOT = true; + } else { + m_supportsGLSL = m_extensions.contains("GL_ARB_shader_objects") && + m_extensions.contains("GL_ARB_fragment_shader") && + m_extensions.contains("GL_ARB_vertex_shader"); - m_textureNPOT = m_extensions.contains("GL_ARB_texture_non_power_of_two"); -#endif + m_textureNPOT = m_extensions.contains("GL_ARB_texture_non_power_of_two"); + } } else if (platformInterface == GlxPlatformInterface) { -#ifndef KWIN_HAVE_OPENGLES m_supportsGLSL = m_extensions.contains("GL_ARB_shader_objects") && m_extensions.contains("GL_ARB_fragment_shader") && m_extensions.contains("GL_ARB_vertex_shader"); m_textureNPOT = m_extensions.contains("GL_ARB_texture_non_power_of_two"); -#endif } m_serverVersion = getXServerVersion();