From 0122c07e10196d3f4aa5817bbfa9a6e005b00a57 Mon Sep 17 00:00:00 2001 From: rdb Date: Mon, 6 Dec 2021 22:25:28 +0100 Subject: [PATCH] makepanda: Add pandagles2 to Config.prc, fall back if pandagl not built --- makepanda/config.in | 1 + makepanda/makepanda.py | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/makepanda/config.in b/makepanda/config.in index e262da5bf0..158fb5fa77 100644 --- a/makepanda/config.in +++ b/makepanda/config.in @@ -15,6 +15,7 @@ load-display pandagl #load-display pandadx9 #load-display pandagles +#load-display pandagles2 #load-display p3tinydisplay # These control the placement and size of the default rendering window. diff --git a/makepanda/makepanda.py b/makepanda/makepanda.py index 94a446e658..8db8df7af2 100755 --- a/makepanda/makepanda.py +++ b/makepanda/makepanda.py @@ -2830,7 +2830,12 @@ if PkgSkip("GL") or GetLinkAllStatic(): configprc = configprc.replace("\nload-display pandagl", "\n#load-display pandagl") 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(): configprc = configprc.replace("\n#load-display pandadx9", "")