Explorar o código

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

rdb %!s(int64=13) %!d(string=hai) anos
pai
achega
78c982f0c0
Modificáronse 1 ficheiros con 9 adicións e 0 borrados
  1. 9 0
      panda/src/androiddisplay/androidGraphicsStateGuardian.cxx

+ 9 - 0
panda/src/androiddisplay/androidGraphicsStateGuardian.cxx

@@ -290,6 +290,15 @@ reset() {
 #else
 #else
   GLESGraphicsStateGuardian::reset();
   GLESGraphicsStateGuardian::reset();
 #endif
 #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);
+  }
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////