Workaround for FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT error

I noticed I was getting the following message when running Tut-Shadow-Mapping-Advanced.py and Tut-Shadow-Mapping-NoShader.py:

:display:gsg:glgsg(error): GL texture creation failed for  : invalid operation
:display:gsg:glgsg(error): Could not load 
:display:gsg:glgsg(error): at 415 of panda/src/glstuff/glGraphicsBuffer_src.cxx : GL error 1286
:display:gsg:glgsg(error): EXT_framebuffer_object reports non-framebuffer-completeness:
:display:gsg:glgsg(error): FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT for offscreen buffer
:display:gsg:glgsg(error): GL texture creation failed for  : invalid operation
:display:gsg:glgsg(error): Could not load 
:display:gsg:glgsg(error): GL texture creation failed for  : invalid operation
:display:gsg:glgsg(error): Could not load 
:display:gsg:glgsg(error): GL texture creation failed for  : invalid operation
:display:gsg:glgsg(error): Could not load 
:display:gsg:glgsg(error): GL texture creation failed for  : invalid operation
:display:gsg:glgsg(error): Could not load 
Segmentation fault

After a little poking around, it turns out the problem lies with GraphicsOutput.RTPDepthStencil. Modifying all occurrences of GraphicsOutput.RTPDepthStencil to GraphicsOutput.RTPDepth fixes both examples.

So if you’re getting this error when you run the shadow samples, this just might be the fix you’re looking for. :slight_smile:

Thanks Danger!
Had the same problem with an intel onboard. Running nice now! =)