I just chose Rust to get into programming, the road is a quite a bit harder but I wanted to start with a language that I think has the most promise.
I have started to dabble with the rust-sdl2 crate and I am stuck on a specific issue and struggling to understand the documentation.
I'm trying to render pixels to the screen at a decent frame rate so I started playing using
sdl2::render::Canvas::set_draw_color but it's dreadfully slow.
I did a bit of research and it seems that the fastest way to do it is to use a texture and then copy the texture to the renderer. Unfornately, I can only find examples on how to load textures from files and I can't figure out how to actually write to a raw texture.
I would really appreciate some help, I guess the fact that I'm a beginner at both Rust and SDL doesn't help but it's the only way I found to get myself some motivation.
Thanks in advance!