Enabling depth buffer?
borisblizzard opened this issue · 0 comments
So I've been trying to enable a depth buffer for the default framebuffer (or the used render texture), but I haven't been able to actually find that particular instance of the RenderTexture or Framebuffer object. I can confirm that it works fine if I set Framebuffer.depth
to true and call Framebuffer.addDepthTexture()
somewhere after the creation and then use the needed GL calls to make it work, but I obviously don't want every framebuffer to have a depth buffer (and I want to make sure that it's cleared properly on every buffer swap).
So, any ideas how I can make this work? Just being able to fetch the Framebuffer object and the current RenderTexture object that's rendered onto before that texture itself is drawn onto the Framebuffer object.
I'm using v5.2.4.