From 17776b0666c4813b0a18bad2f4b3989ddb4347c3 Mon Sep 17 00:00:00 2001 From: rdb Date: Sun, 8 Mar 2020 10:31:03 +0100 Subject: [PATCH] glgsg: fix shader not being applied if same across multiple buffers See https://discourse.panda3d.org/t/multi-pass-rendering-setinitialstate-wont-apply-shader/25712 --- panda/src/glstuff/glGraphicsStateGuardian_src.cxx | 1 + 1 file changed, 1 insertion(+) diff --git a/panda/src/glstuff/glGraphicsStateGuardian_src.cxx b/panda/src/glstuff/glGraphicsStateGuardian_src.cxx index 094df8ece4..040e71ea8d 100644 --- a/panda/src/glstuff/glGraphicsStateGuardian_src.cxx +++ b/panda/src/glstuff/glGraphicsStateGuardian_src.cxx @@ -4148,6 +4148,7 @@ end_frame(Thread *current_thread) { _current_shader = nullptr; _current_shader_context = nullptr; } + _state_shader = nullptr; #endif // Respecify the active texture next frame, for good measure.