January 2018
Beginner to intermediate
454 pages
10h 8m
English
We now have a working window; it'd be nice to draw into it. First, we need to get the window's canvas before starting the main loop:
let mut canvas = window.into_canvas() .target_texture() .present_vsync() .build() .expect("Couldn't get window's canvas");
A few explanations for the preceding code:
Then we'll create a texture that we'll paste onto the window's canvas. First, let's get the texture creator, but before that, add this include at the ...
Read now
Unlock full access