-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
Description
bevy_light_field/src/stream.rs
Line 193 in e37479f
| // TODO: use a default 'stream loading' texture |
pub fn new(
descriptor: StreamDescriptor,
id: StreamId,
images: &mut Assets<Image>,
) -> Self {
let size = Extent3d {
width: 32,
height: 32,
..default()
};
// TODO: use a default 'stream loading' texture
let mut image = Image {
asset_usage: RenderAssetUsages::all(),
texture_descriptor: TextureDescriptor {
label: None,
size,
dimension: TextureDimension::D2,
format: TextureFormat::Rgba8UnormSrgb,
mip_level_count: 1,
sample_count: 1,
usage: TextureUsages::COPY_DST
| TextureUsages::TEXTURE_BINDING
| TextureUsages::RENDER_ATTACHMENT,
view_formats: &[TextureFormat::Rgba8UnormSrgb],
},
..default()
};
image.resize(size);
let image = images.add(image);
Self {
descriptor,
id,