/// Use an external image as an input for a render graph node
Use an external image as an input for a render graph node
Use an external image as an input for a render graph node
pub fn read_external_image(
        &mut self,
        external_image_id: RenderGraphExternalImageId,
    ) -> RenderGraphImageUsageId {
        let external_image = &self.external_images[external_image_id.0];
        let image_resource_index = external_image.image_resource_index;
        let view_options = external_image.view_options.clone();
        let version_id = RenderGraphImageVersionId {
            index: image_resource_index,
            version: 0,
        };
        let input_usage = self.add_image_usage(
            RenderGraphImageUser::Input(external_image_id),
            version_id,
            RenderGraphImageUsageType::Input,
            view_options,
        );
        let version_info =
            RenderGraphImageResourceVersionInfo::new(RenderGraphNodeId(0), input_usage);
        let resource = &mut self.image_resources[image_resource_index];
        resource.versions.push(version_info);
        self.external_images[external_image_id.0].input_usage = Some(input_usage);
        input_usage
    }
pub fn read_external_image ( & mut self , external_image_id : RenderGraphExternalImageId , ) -> RenderGraphImageUsageId { let external_image = & self . external_images [ external_image_id . 0 ] ; let image_resource_index = external_image . image_resource_index ; let view_options = external_image . view_options . clone ( ) ; let version_id = RenderGraphImageVersionId { index : image_resource_index , version : 0 , } ; let input_usage = self . add_image_usage ( RenderGraphImageUser :: Input ( external_image_id ) , version_id , RenderGraphImageUsageType :: Input , view_options , ) ; let version_info = RenderGraphImageResourceVersionInfo :: new ( RenderGraphNodeId ( 0 ) , input_usage ) ; let resource = & mut self . image_resources [ image_resource_index ] ; resource . versions . push ( version_info ) ; self . external_images [ external_image_id . 0 ] . input_usage = Some ( input_usage ) ; input_usage }
Use an external image as an input for a render graph node
Use an external image as an input for a render graph node
&mut self
external_image_id
RenderGraphExternalImageId