From 96de2703203ee9a1bc23750b7542266b5118207d Mon Sep 17 00:00:00 2001 From: rdb Date: Mon, 11 May 2015 20:31:10 +0200 Subject: [PATCH] Fall back to depth textures when depth-stencil textures aren't supported --- panda/src/glstuff/glGraphicsBuffer_src.cxx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/panda/src/glstuff/glGraphicsBuffer_src.cxx b/panda/src/glstuff/glGraphicsBuffer_src.cxx index ced71cdddd..36aa82684d 100644 --- a/panda/src/glstuff/glGraphicsBuffer_src.cxx +++ b/panda/src/glstuff/glGraphicsBuffer_src.cxx @@ -381,6 +381,10 @@ rebuild_bitplanes() { // buffer was requested. _use_depth_stencil = true; } + } else if (attach[RTP_depth_stencil] != NULL && attach[RTP_depth] == NULL) { + // The depth stencil slot was assigned a texture, but we don't support it. + // Downgrade to a regular depth texture. + swap(attach[RTP_depth], attach[RTP_depth_stencil]); } // Knowing this, we can already be a tiny bit more accurate about the