From 78c982f0c02c3e57f58ade45959b93ba35cd0ff9 Mon Sep 17 00:00:00 2001 From: rdb Date: Sat, 26 Jan 2013 20:33:40 +0000 Subject: [PATCH] Detect whether the OpenGL implementation is software or handware by looking for "PixelFlinger" in GL_RENDERER --- .../src/androiddisplay/androidGraphicsStateGuardian.cxx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/panda/src/androiddisplay/androidGraphicsStateGuardian.cxx b/panda/src/androiddisplay/androidGraphicsStateGuardian.cxx index 889fda8aa7..d987cbe0fc 100644 --- a/panda/src/androiddisplay/androidGraphicsStateGuardian.cxx +++ b/panda/src/androiddisplay/androidGraphicsStateGuardian.cxx @@ -290,6 +290,15 @@ reset() { #else GLESGraphicsStateGuardian::reset(); #endif + + // If "PixelFlinger" is present, assume software. + if (_gl_renderer.find("PixelFlinger") != string::npos) { + _fbprops.set_force_software(1); + _fbprops.set_force_hardware(0); + } else { + _fbprops.set_force_hardware(1); + _fbprops.set_force_software(0); + } } ////////////////////////////////////////////////////////////////////