Fix nested display lists rendering twice (#1349)

* Fix nested display lists rendering twice

* cleanup
This commit is contained in:
sisyphussy authored and GitHub committed 2026-01-31 05:45:48 -08:00
1 parent f79ad7f22a
commit dd970b4c6a
1 file changed
+13 -2
@@ -1019,11 +1019,22 @@ public class DisplayListManager {
if (currentRecorder != null) {
recordCallList(list);
if (glListMode == GL11.GL_COMPILE) {
return;
if (getListMode() != GL11.GL_COMPILE) {
// Don't record the GL calls, we already recorded glCallList
final CommandRecorder recorder = currentRecorder;
currentRecorder = null;
executeDisplayList(list);
currentRecorder = recorder;
}
return;
}
executeDisplayList(list);
}
private static void executeDisplayList(int list) {
final CompiledDisplayList compiled = displayListCache.get(list);
if (compiled != null) {
final int prevList = currentRenderingList;