def _create_buffer(self, width, height, frame_buffer_property):
        """
        Boilerplate code to create a render buffer producing only a depth texture

        Returns: FrameBuffer for rendering into

        """
        self.depth_tex = Texture("DepthCameraTexture")
        self.depth_tex.setFormat(Texture.FDepthComponent)

        window_props = WindowProperties.size(width, height)
        props = FrameBufferProperties()
        props.setRgbColor(0)
        props.setAlphaBits(0)
        props.setDepthBits(1)

        buffer_props = props
        buffer_props.set_rgba_bits(0, 0, 0, 0)
        # buffer_props.set_accum_bits(0)
        # buffer_props.set_stencil_bits(0)
        # buffer_props.set_back_buffers(0)
        # buffer_props.set_coverage_samples(0)
        buffer_props.set_float_depth(True)

        self.buffer = buffer = self.engine.graphicsEngine.makeOutput(
            self.engine.pipe, "Depth buffer", -2, props, window_props, GraphicsPipe.BFRefuseWindow,
            self.engine.win.getGsg(), self.engine.win
        )
        mode = GraphicsOutput.RTMBindOrCopy if self._enable_cuda else GraphicsOutput.RTMCopyRam
        self.buffer.addRenderTexture(self.depth_tex, mode, GraphicsOutput.RTPDepth)
        buffer.set_sort(-1000)
        buffer.disable_clears()
        buffer.get_display_region(0).disable_clears()
        buffer.get_overlay_display_region().disable_clears()
        buffer.get_overlay_display_region().set_active(False)

        # Remove all unused display regions
        buffer.remove_all_display_regions()
        buffer.get_display_region(0).set_active(False)
        buffer.disable_clears()

        # Set a clear on the buffer instead on all regions
        buffer.set_clear_depth(1)
        buffer.set_clear_depth_active(True)
        self.buffer = buffer

        if self.enable_cuda:
            self.output_tex = Texture()
            self.output_tex.setup_2d_texture(
                self.depth_tex.getXSize(), self.depth_tex.getYSize(), Texture.T_unsigned_byte, Texture.F_rgba8
            )
            self.output_tex.set_clear_color((0, 0, 0, 1))
            shader = Shader.load_compute(Shader.SL_GLSL, AssetLoader.file_path("../shaders", "depth_cuda.glsl"))
            self.compute_node = NodePath("dummy")
            self.compute_node.set_shader(shader)

        Boilerplate code to create a render buffer producing only a depth texture

        Returns: FrameBuffer for rendering into

        
metadrive/component/sensors/depth_camera.py