def get_depth_buffer(self):
        viewport = self.get_viewport()
        viewport_width = viewport[2]
        viewport_height = viewport[3]
        if (not self.depth_buffer or 
            viewport_width != self.depth_buffer.width or
            viewport_height != self.depth_buffer.height):
            self.depth_buffer = DepthBufferImage(*viewport)
        return self.depth_buffer
Get the depth buffer.
dataset/ETHPy150Open ardekantur/pyglet/pyglet/image/__init__.py/BufferManager.get_depth_buffer