gigs 0.1.1

on-demand graphics jobs for the Bevy Game Engine
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use bevy_app::App;

use super::{GraphicsJob, SpecializedGraphicsJobPlugin};

/// An extension trait for initializing graphics jobs on [`App`]
pub trait InitGraphicsJobExt {
    fn init_graphics_job<J: GraphicsJob>(&mut self) -> &mut Self;
}

impl InitGraphicsJobExt for App {
    fn init_graphics_job<J: GraphicsJob>(&mut self) -> &mut Self {
        self.add_plugins(SpecializedGraphicsJobPlugin::<J>::default())
    }
}