def _make_properties(self):
        """ Creates the window and buffer properties """
        window_props = WindowProperties.size(self._size.x, self._size.y)
        buffer_props = FrameBufferProperties()

        if self._color_bits == (16, 16, 16, 0):
            if RenderTarget.USE_R11G11B10:
                buffer_props.set_rgba_bits(11, 11, 10, 0)
            else:
                buffer_props.set_rgba_bits(*self._color_bits)
        elif 8 in self._color_bits:
            # When specifying 8 bits, specify 1 bit, this is a workarround
            # to a legacy logic in panda
            buffer_props.set_rgba_bits(*[i if i != 8 else 1 for i in self._color_bits])
        else:
            buffer_props.set_rgba_bits(*self._color_bits)

        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_depth_bits(self._depth_bits)

        if self._depth_bits == 32:
            buffer_props.set_float_depth(True)

        buffer_props.set_float_color(max(self._color_bits) > 8)

        buffer_props.set_force_hardware(True)
        buffer_props.set_multisamples(0)
        buffer_props.set_srgb_color(False)
        buffer_props.set_stereo(False)
        buffer_props.set_stencil_bits(0)

        if self._aux_bits == 8:
            buffer_props.set_aux_rgba(self._aux_count)
        elif self._aux_bits == 16:
            buffer_props.set_aux_hrgba(self._aux_count)
        elif self._aux_bits == 32:
            buffer_props.set_aux_float(self._aux_count)
        else:
            self.error("Invalid aux bits")

        return window_props, buffer_props
dataset/ETHPy150Open tobspr/RenderPipeline/rpcore/render_target.py/RenderTarget._make_properties/original