
This is a squash-and-rebase of @Ku95's documentation of the new renderer onto the latest `pipelined-rendering` branch. Original PR is #2884. Co-authored-by: dataphract <dataphract@gmail.com> Co-authored-by: Carter Anderson <mcanders1@gmail.com>
21 lines
519 B
Rust
21 lines
519 B
Rust
#[allow(clippy::module_inception)]
|
|
mod mesh;
|
|
/// Generation for some primitive shape meshes.
|
|
pub mod shape;
|
|
|
|
pub use mesh::*;
|
|
|
|
use crate::render_asset::RenderAssetPlugin;
|
|
use bevy_app::{App, Plugin};
|
|
use bevy_asset::AddAsset;
|
|
|
|
/// Adds the [`Mesh`] as an asset and makes sure that they are extracted and prepared for the GPU.
|
|
pub struct MeshPlugin;
|
|
|
|
impl Plugin for MeshPlugin {
|
|
fn build(&self, app: &mut App) {
|
|
app.add_asset::<Mesh>()
|
|
.add_plugin(RenderAssetPlugin::<Mesh>::default());
|
|
}
|
|
}
|