pub fn build<R, F>(self, mut factory: F) -> GlyphBrush<'a, R, F>
    where
        R: gfx::Resources,
        F: gfx::Factory<R>,
    {
        let (cache_width, cache_height) = self.initial_cache_size;
        let font_cache_tex = create_texture(&mut factory, cache_width, cache_height).unwrap();

        GlyphBrush {
            fonts: self.font_data
                .into_iter()
                .enumerate()
                .map(|(idx, data)| (FontId(idx), data))
                .collect(),
            font_cache: Cache::new(
                cache_width,
                cache_height,
                self.gpu_cache_scale_tolerance,
                self.gpu_cache_position_tolerance,
            ),
            font_cache_tex,

            factory,
            draw_cache: None,
            section_buffer: Vec::new(),
            calculate_glyph_cache: HashMap::new(),
            keep_in_cache: HashSet::new(),

            gpu_cache_scale_tolerance: self.gpu_cache_scale_tolerance,
            gpu_cache_position_tolerance: self.gpu_cache_position_tolerance,
            cache_glyph_positioning: self.cache_glyph_positioning,
            cache_glyph_drawing: self.cache_glyph_drawing && self.cache_glyph_positioning,

            depth_test: self.depth_test,

            #[cfg(feature = "performance_stats")]
            perf: performance_stats::PerformanceStats::default(),
        }
    }
/// Builds a `GlyphBrush` using the input gfx factory
Builds a `GlyphBrush` using the input gfx factory
Builds a ` GlyphBrush ` using the input gfx factory
pub fn build<R, F>(self, mut factory: F) -> GlyphBrush<'a, R, F>
    where
        R: gfx::Resources,
        F: gfx::Factory<R>,
    {
        let (cache_width, cache_height) = self.initial_cache_size;
        let font_cache_tex = create_texture(&mut factory, cache_width, cache_height).unwrap();
        GlyphBrush {
            fonts: self.font_data
                .into_iter()
                .enumerate()
                .map(|(idx, data)| (FontId(idx), data))
                .collect(),
            font_cache: Cache::new(
                cache_width,
                cache_height,
                self.gpu_cache_scale_tolerance,
                self.gpu_cache_position_tolerance,
            ),
            font_cache_tex,
            factory,
            draw_cache: None,
            section_buffer: Vec::new(),
            calculate_glyph_cache: HashMap::new(),
            keep_in_cache: HashSet::new(),
            gpu_cache_scale_tolerance: self.gpu_cache_scale_tolerance,
            gpu_cache_position_tolerance: self.gpu_cache_position_tolerance,
            cache_glyph_positioning: self.cache_glyph_positioning,
            cache_glyph_drawing: self.cache_glyph_drawing && self.cache_glyph_positioning,
            depth_test: self.depth_test,
            #[cfg(feature = "performance_stats")]
            perf: performance_stats::PerformanceStats::default(),
        }
    }
pub fn build < R , F > ( self , mut factory : F ) -> GlyphBrush < ' a , R , F > where R : gfx :: Resources , F : gfx :: Factory < R > , { let ( cache_width , cache_height ) = self . initial_cache_size ; let font_cache_tex = create_texture ( & mut factory , cache_width , cache_height ) . unwrap ( ) ; GlyphBrush { fonts : self . font_data . into_iter ( ) . enumerate ( ) . map ( | ( idx , data ) | ( FontId ( idx ) , data ) ) . collect ( ) , font_cache : Cache :: new ( cache_width , cache_height , self . gpu_cache_scale_tolerance , self . gpu_cache_position_tolerance , ) , font_cache_tex , factory , draw_cache : None , section_buffer : Vec :: new ( ) , calculate_glyph_cache : HashMap :: new ( ) , keep_in_cache : HashSet :: new ( ) , gpu_cache_scale_tolerance : self . gpu_cache_scale_tolerance , gpu_cache_position_tolerance : self . gpu_cache_position_tolerance , cache_glyph_positioning : self . cache_glyph_positioning , cache_glyph_drawing : self . cache_glyph_drawing && self . cache_glyph_positioning , depth_test : self . depth_test , # [ cfg ( feature " " ) ] perf : performance_stats :: PerformanceStats :: default ( ) , } }
Builds a `GlyphBrush` using the input gfx factory
Builds a ` GlyphBrush ` using the input gfx factory
self
factory
F
self
factory
F