struggling with the borrow checker
This commit is contained in:
@@ -51,7 +51,10 @@ mod vkprocessor;
|
||||
|
||||
fn main() {
|
||||
|
||||
let processor = vkprocessor::VkProcessor::new();
|
||||
let mut processor = vkprocessor::VkProcessor::new();
|
||||
processor.compile_kernel();
|
||||
processor.load_buffers();
|
||||
|
||||
|
||||
|
||||
let mut window = RenderWindow::new(
|
||||
@@ -66,8 +69,9 @@ fn main() {
|
||||
|
||||
let font = Font::from_file("resources/fonts/sansation.ttf").unwrap();
|
||||
|
||||
let xy = processor.img.unwrap().dimensions();
|
||||
let mut bg_texture = Texture::new(xy.0, xy.1).unwrap();
|
||||
bg_texture.update_from_pixels(image_buffer.as_slice(), xy.0, xy.1, 0, 0);
|
||||
bg_texture.update_from_pixels(processor.image_buffer.as_slice(), xy.0, xy.1, 0, 0);
|
||||
|
||||
let mut background_sprite = Sprite::with_texture(&bg_texture);
|
||||
background_sprite.set_position((0., 0.));
|
||||
|
||||
Reference in New Issue
Block a user