From 5c6e32eaed5d1dfa52002d38f707a1329355bc97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Sun, 12 Dec 2010 12:07:56 +0100 Subject: [PATCH] GLPlatform compiles on EGL --- lib/kwinglplatform.cpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/lib/kwinglplatform.cpp b/lib/kwinglplatform.cpp index d36e6067c7..51b869e034 100644 --- a/lib/kwinglplatform.cpp +++ b/lib/kwinglplatform.cpp @@ -34,7 +34,6 @@ along with this program. If not, see . #include #ifdef KWIN_HAVE_OPENGL -#ifndef KWIN_HAVE_OPENGLES namespace KWin { @@ -503,18 +502,24 @@ void GLPlatform::detect() m_mesaVersion = parseVersionString(version); } +#ifdef KWIN_HAVE_OPENGLES + m_directRendering = true; + m_supportsGLSL = true; + m_textureNPOT = true; +#else GLXContext ctx = glXGetCurrentContext(); m_directRendering = glXIsDirect(display(), ctx); - m_serverVersion = getXServerVersion(); - m_kernelVersion = getKernelVersion(); - m_supportsGLSL = m_extensions.contains("GL_ARB_shading_language_100") && 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(); + m_kernelVersion = getKernelVersion(); m_glslVersion = 0; m_glsl_version = QByteArray(); @@ -833,6 +838,5 @@ bool GLPlatform::isIntel() const } // namespace KWin -#endif // KWIN_HAVE_OPENGLES #endif // KWIN_HAVE_OPENGL