/// Use an external buffer as an input for a render graph node
Use an external buffer as an input for a render graph node
Use an external buffer as an input for a render graph node
pub fn read_external_buffer(
        &mut self,
        external_buffer_id: RenderGraphExternalBufferId,
    ) -> RenderGraphBufferUsageId {
        let external_buffer = &self.external_buffers[external_buffer_id.0];
        let buffer_resource_index = external_buffer.buffer_resource_index;
        let version_id = RenderGraphBufferVersionId {
            index: buffer_resource_index,
            version: 0,
        };
        let input_usage = self.add_buffer_usage(
            RenderGraphBufferUser::Input(external_buffer_id),
            version_id,
            RenderGraphBufferUsageType::Input,
        );
        let version_info =
            RenderGraphBufferResourceVersionInfo::new(RenderGraphNodeId(0), input_usage);
        let resource = &mut self.buffer_resources[buffer_resource_index];
        resource.versions.push(version_info);
        self.external_buffers[external_buffer_id.0].input_usage = Some(input_usage);
        input_usage
    }
pub fn read_external_buffer ( & mut self , external_buffer_id : RenderGraphExternalBufferId , ) -> RenderGraphBufferUsageId { let external_buffer = & self . external_buffers [ external_buffer_id . 0 ] ; let buffer_resource_index = external_buffer . buffer_resource_index ; let version_id = RenderGraphBufferVersionId { index : buffer_resource_index , version : 0 , } ; let input_usage = self . add_buffer_usage ( RenderGraphBufferUser :: Input ( external_buffer_id ) , version_id , RenderGraphBufferUsageType :: Input , ) ; let version_info = RenderGraphBufferResourceVersionInfo :: new ( RenderGraphNodeId ( 0 ) , input_usage ) ; let resource = & mut self . buffer_resources [ buffer_resource_index ] ; resource . versions . push ( version_info ) ; self . external_buffers [ external_buffer_id . 0 ] . input_usage = Some ( input_usage ) ; input_usage }
Use an external buffer as an input for a render graph node
Use an external buffer as an input for a render graph node
&mut self
external_buffer_id
RenderGraphExternalBufferId