2
0
Эх сурвалжийг харах

Detect whether the OpenGL implementation is software or handware by looking for "PixelFlinger" in GL_RENDERER

rdb 13 жил өмнө
parent
commit
78c982f0c0

+ 9 - 0
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);
+  }
 }
 
 ////////////////////////////////////////////////////////////////////