Use RenderContext for TextureManager::new
This commit is contained in:
parent
bfa7a48483
commit
4af16fb974
1 changed files with 33 additions and 29 deletions
|
@ -125,9 +125,11 @@ pub struct TextureManager {
|
|||
}
|
||||
|
||||
impl TextureManager {
|
||||
pub fn new(render_device: &wgpu::Device) -> Self {
|
||||
pub fn new(render_context: &RenderContext) -> Self {
|
||||
let bind_group_layout =
|
||||
render_device.create_bind_group_layout(&wgpu::BindGroupLayoutDescriptor {
|
||||
render_context
|
||||
.device
|
||||
.create_bind_group_layout(&wgpu::BindGroupLayoutDescriptor {
|
||||
label: Some("texture_bind_group_layout"),
|
||||
entries: &[
|
||||
wgpu::BindGroupLayoutEntry {
|
||||
|
@ -152,7 +154,9 @@ impl TextureManager {
|
|||
],
|
||||
});
|
||||
|
||||
let sampler = render_device.create_sampler(&wgpu::SamplerDescriptor {
|
||||
let sampler = render_context
|
||||
.device
|
||||
.create_sampler(&wgpu::SamplerDescriptor {
|
||||
address_mode_u: wgpu::AddressMode::Repeat,
|
||||
address_mode_v: wgpu::AddressMode::Repeat,
|
||||
address_mode_w: wgpu::AddressMode::Repeat,
|
||||
|
|
Loading…
Reference in a new issue