Fix invalid framebuffer depth/stencil setup

Fixes bugs created by #995.
The bug caused the game to log 1286: "Invalid framebuffer operation", while not rendering visuals at all.