parent
af821c9e49
commit
46ddf4e3f0
|
@ -38,14 +38,14 @@ fn main() -> Result<(), Error> {
|
||||||
.unwrap()
|
.unwrap()
|
||||||
};
|
};
|
||||||
|
|
||||||
let mut pixels = {
|
|
||||||
let window_size = window.inner_size();
|
let window_size = window.inner_size();
|
||||||
|
let mut pixels = {
|
||||||
let surface_texture = SurfaceTexture::new(window_size.width, window_size.height, &window);
|
let surface_texture = SurfaceTexture::new(window_size.width, window_size.height, &window);
|
||||||
Pixels::new(WIDTH, HEIGHT, surface_texture)?
|
Pixels::new(WIDTH, HEIGHT, surface_texture)?
|
||||||
};
|
};
|
||||||
let mut world = World::new();
|
let mut world = World::new();
|
||||||
let mut time = 0.0;
|
let mut time = 0.0;
|
||||||
let mut noise_renderer = NoiseRenderer::new(&pixels, WIDTH, HEIGHT);
|
let mut noise_renderer = NoiseRenderer::new(&pixels, window_size.width, window_size.height);
|
||||||
|
|
||||||
event_loop.run(move |event, _, control_flow| {
|
event_loop.run(move |event, _, control_flow| {
|
||||||
// Draw the current frame
|
// Draw the current frame
|
||||||
|
|
Loading…
Reference in a new issue