diff --git a/CHANGELOG.md b/CHANGELOG.md index d1b376d..ec71f8f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changes +## [0.4.0] - 2023-11-06 + +* bump bevy version to `0.12` + ## [0.2.0] - 2023-03-13 ### Updated diff --git a/Cargo.toml b/Cargo.toml index 24c28bf..8467a2c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,7 +7,7 @@ readme = "README.md" keywords = ["camera", "v4l2", "opencv", "vision"] categories = ["multimedia", "rendering"] license = "MIT OR Apache-2.0" -version = "0.3.0" +version = "0.4.0" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html @@ -18,14 +18,14 @@ native = ["nokhwa/input-native"] [dependencies] anyhow = "1.0.66" -bevy = { version = "0.11.0", default-features = false, features = ["bevy_render", "bevy_core_pipeline", "bevy_asset", "bevy_winit", "bevy_pbr", "x11", "png"] } +bevy = { version = "0.12.0", default-features = false, features = ["bevy_render", "bevy_core_pipeline", "bevy_asset", "bevy_winit", "bevy_pbr", "x11", "png", "tonemapping_luts"] } bytemuck = { version = "1.7.0" } flume = "0.10.11" image = { version = "0.24", default-features = false, features = [] } nokhwa = { version = "0.10", features = ["input-native", "output-threaded"] } [dev-dependencies] -bevy_egui = "0.20.0" +bevy_egui = "0.23.0" diff --git a/README.md b/README.md index 3ce5a77..d49f9e7 100644 --- a/README.md +++ b/README.md @@ -68,6 +68,7 @@ fn setup_camera( | bevy | bevy_nokhwa | |------|-------------| +| 0.12 | 0.4.X | | 0.11 | 0.3.X | | 0.10 | 0.2.X | | 0.9 | 0.1.X | diff --git a/src/background.rs b/src/background.rs index 324b335..7e52d9c 100644 --- a/src/background.rs +++ b/src/background.rs @@ -4,16 +4,16 @@ use bevy::render::extract_resource::ExtractResource; use bevy::render::render_graph::Node; use bevy::render::render_graph::{NodeRunError, RenderGraphContext, SlotInfo}; use bevy::render::render_resource::{ - AddressMode, BindGroup, BindGroupDescriptor, BindGroupEntry, BindGroupLayoutDescriptor, - BindGroupLayoutEntry, BindingResource, BindingType, BlendComponent, BlendState, Buffer, - BufferAddress, BufferInitDescriptor, BufferUsages, ColorTargetState, ColorWrites, Extent3d, - Face, FilterMode, FrontFace, ImageCopyTexture, ImageDataLayout, IndexFormat, LoadOp, - MultisampleState, Operations, Origin3d, PipelineLayoutDescriptor, PolygonMode, PrimitiveState, - PrimitiveTopology, RawFragmentState, RawRenderPipelineDescriptor, RawVertexBufferLayout, - RawVertexState, RenderPassDescriptor, RenderPipeline, SamplerBindingType, SamplerDescriptor, - ShaderModuleDescriptor, ShaderSource, ShaderStages, TextureAspect, TextureDescriptor, - TextureDimension, TextureFormat, TextureSampleType, TextureUsages, TextureViewDescriptor, - TextureViewDimension, VertexAttribute, VertexFormat, VertexStepMode, + AddressMode, BindGroup, BindGroupEntries, BindGroupLayoutDescriptor, BindGroupLayoutEntry, + BindingType, BlendComponent, BlendState, Buffer, BufferAddress, BufferInitDescriptor, + BufferUsages, ColorTargetState, ColorWrites, Extent3d, Face, FilterMode, FrontFace, + ImageCopyTexture, ImageDataLayout, IndexFormat, LoadOp, MultisampleState, Operations, Origin3d, + PipelineLayoutDescriptor, PolygonMode, PrimitiveState, PrimitiveTopology, RawFragmentState, + RawRenderPipelineDescriptor, RawVertexBufferLayout, RawVertexState, RenderPassDescriptor, + RenderPipeline, SamplerBindingType, SamplerDescriptor, ShaderModuleDescriptor, ShaderSource, + ShaderStages, TextureAspect, TextureDescriptor, TextureDimension, TextureFormat, + TextureSampleType, TextureUsages, TextureViewDescriptor, TextureViewDimension, VertexAttribute, + VertexFormat, VertexStepMode, }; use bevy::render::renderer::{RenderContext, RenderDevice, RenderQueue}; use bevy::render::texture::BevyDefault; @@ -299,20 +299,11 @@ impl Node for BackgroundNode { label: Some("texture_bind_group_layout"), }); - let diffuse_bind_group = device.create_bind_group(&BindGroupDescriptor { - layout: &texture_bind_group_layout, - entries: &[ - BindGroupEntry { - binding: 0, - resource: BindingResource::TextureView(&view), - }, - BindGroupEntry { - binding: 1, - resource: BindingResource::Sampler(&sampler), - }, - ], - label: Some("diffuse_bind_group"), - }); + let diffuse_bind_group = device.create_bind_group( + Some("diffuse_bind_group"), + &texture_bind_group_layout, + &BindGroupEntries::sequential((&view, &sampler)), + ); self.diffuse_bind_group = Some(diffuse_bind_group); }