use raylib::prelude::*;
fn main() {
let (mut rl, thread) = raylib::init().size(640, 480).title("Hello, World").build();
while !rl.window_should_close() {
let mut d = rl.begin_drawing(&thread);
d.load_texture(&d, "./assets/Grass.png"); // error here
d.clear_background(Color::BLACK);
}
}
mismatched types expected reference
&RaylibThread
found reference&RaylibDrawHandle<'_>
rustcClick for full compiler diagnostic main.rs(12, 11): arguments to this function are incorrect texture.rs(856, 12): associated function defined here
I figure i borrow the reference by doing &d
Maybe im missing something. I'm a bit confused on how to proceed.