Add CameraMainTextureUsages helper method (#19549)
Split off from https://github.com/bevyengine/bevy/pull/19058
This commit is contained in:
parent
ec307bcb9f
commit
16440be327
@ -1060,6 +1060,7 @@ pub fn camera_system(
|
|||||||
#[reflect(opaque)]
|
#[reflect(opaque)]
|
||||||
#[reflect(Component, Default, Clone)]
|
#[reflect(Component, Default, Clone)]
|
||||||
pub struct CameraMainTextureUsages(pub TextureUsages);
|
pub struct CameraMainTextureUsages(pub TextureUsages);
|
||||||
|
|
||||||
impl Default for CameraMainTextureUsages {
|
impl Default for CameraMainTextureUsages {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
Self(
|
Self(
|
||||||
@ -1070,6 +1071,13 @@ impl Default for CameraMainTextureUsages {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl CameraMainTextureUsages {
|
||||||
|
pub fn with(mut self, usages: TextureUsages) -> Self {
|
||||||
|
self.0 |= usages;
|
||||||
|
self
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#[derive(Component, Debug)]
|
#[derive(Component, Debug)]
|
||||||
pub struct ExtractedCamera {
|
pub struct ExtractedCamera {
|
||||||
pub target: Option<NormalizedRenderTarget>,
|
pub target: Option<NormalizedRenderTarget>,
|
||||||
|
Loading…
Reference in New Issue
Block a user