Browse Source

makepanda: Add pandagles2 to Config.prc, fall back if pandagl not built

rdb 4 years ago
parent
commit
0122c07e10
2 changed files with 7 additions and 1 deletions
  1. 1 0
      makepanda/config.in
  2. 6 1
      makepanda/makepanda.py

+ 1 - 0
makepanda/config.in

@@ -15,6 +15,7 @@
 load-display pandagl
 load-display pandagl
 #load-display pandadx9
 #load-display pandadx9
 #load-display pandagles
 #load-display pandagles
+#load-display pandagles2
 #load-display p3tinydisplay
 #load-display p3tinydisplay
 
 
 # These control the placement and size of the default rendering window.
 # These control the placement and size of the default rendering window.

+ 6 - 1
makepanda/makepanda.py

@@ -2830,7 +2830,12 @@ if PkgSkip("GL") or GetLinkAllStatic():
     configprc = configprc.replace("\nload-display pandagl", "\n#load-display pandagl")
     configprc = configprc.replace("\nload-display pandagl", "\n#load-display pandagl")
 
 
 if PkgSkip("GLES") or GetLinkAllStatic():
 if PkgSkip("GLES") or GetLinkAllStatic():
-    configprc = configprc.replace("\n#load-display pandagles", "")
+    configprc = configprc.replace("\n#load-display pandagles\n", "\n")
+
+if PkgSkip("GL") and not PkgSkip("GLES2") and not GetLinkAllStatic():
+    configprc = configprc.replace("\n#load-display pandagles2", "\nload-display pandagles2")
+elif PkgSkip("GLES2") or GetLinkAllStatic():
+    configprc = configprc.replace("\n#load-display pandagles2", "")
 
 
 if PkgSkip("DX9") or GetLinkAllStatic():
 if PkgSkip("DX9") or GetLinkAllStatic():
     configprc = configprc.replace("\n#load-display pandadx9", "")
     configprc = configprc.replace("\n#load-display pandadx9", "")