def write_to_buffer(self, buffer_ptr):
        """ Writes the probe to a given byte buffer """
        data, mat = [], Mat4(self._transform.get_mat())
        mat.invert_in_place()
        for i in range(4):
            for j in range(3):
                data.append(mat.get_cell(i, j))
        data += (float(self.index), 1.0 if self._parallax_correction else 0.0, self._border_smoothness, 0)
        data.append(self._bounds.get_center().x)
        data.append(self._bounds.get_center().y)
        data.append(self._bounds.get_center().z)
        data.append(self._bounds.get_radius())
        byte_data = struct.pack("f" * 20, *data)

        # 4 = sizeof float, 20 = floats per cubemap
        bytes_per_probe = 4 * 20
        buffer_ptr.set_subdata(self.index * bytes_per_probe, bytes_per_probe, byte_data)

        self._modified = False
 Writes the probe to a given byte buffer 
metadrive/render_pipeline/rpplugins/env_probes/environment_probe.py