From 116216c6b62a7e89a5f0b7be233ea35d3d65b4c9 Mon Sep 17 00:00:00 2001 From: Simon Fels Date: Wed, 22 Jun 2016 18:46:53 +0200 Subject: [PATCH] Force OpenGL ES 2.0 until our host system does this properly --- .../host/libs/libOpenglRender/RenderControl.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/external/android-emugl/host/libs/libOpenglRender/RenderControl.cpp b/external/android-emugl/host/libs/libOpenglRender/RenderControl.cpp index c9d6953..1b9632b 100644 --- a/external/android-emugl/host/libs/libOpenglRender/RenderControl.cpp +++ b/external/android-emugl/host/libs/libOpenglRender/RenderControl.cpp @@ -88,6 +88,17 @@ static EGLint rcGetGLString(EGLenum name, void* buffer, EGLint bufferSize) len += strlen(glProtocolStr) + 1; } + if (name = GL_VERSION) { + // We're forcing version 2.0 no matter what the host provides as + // our emulation layer isn't prepared for anything newer (yet). + // This goes in parallel with filtering the extension set for + // any unwanted extensions. If we don't force the right version + // here certain parts of the system will assume API conditions + // which aren't met. + static const char *version = "OpenGL ES 2.0"; + str = version; + len = strlen(str) + 1; + } if (!buffer || len > bufferSize) { return -len; }