4 ms·
> I didn’t really want to write any graphics code, so here’s a way to cheat: I wanted to try out Rust maybe a year ago, was thinking of writing a simple termin
by xixixao 11y ago
> I didn’t really want to write any graphics code, so here’s a way to cheat:
I wanted to try out Rust maybe a year ago, was thinking of writing a simple terminal app and found out that there was no way to do simple 2D graphics in Rust. Has the situation changed?
- DizzyDoo 11y agoThere's some nice bindings for SDL that's rather well-maintained: https://github.com/AngryLawyer/rust-sdl2 https://github.com/AngryLawyer/rust-sdl2
- mseri 11y agoThings are moving fast. I'm not sure what you need specifically, but piston[1,2] is probably what to look at and maybe more specifically image[3] or conrod[4] [1]:http://www.piston.rs http://www.piston.rs [2]:http://www.reddit.com/r/rust/comments/28srso/piston_game_engine_notice_on_progress/ http://www.reddit.com/r/rust/comments/28srso/piston_game_eng... [3]:https://github.com/PistonDevelopers/image https://github.com/PistonDevelopers/image [4]:http://blog.piston.rs/2014/08/30/conrod-update/ http://blog.piston.rs/2014/08/30/conrod-update/
- irq-1 11y agoIf you try the piston getting started example on Windows (the spinning square), change the freetype name to "libfreetype.a" and put it in the 1.0 path: C:\Program Files\Rust stable 1.0\bin\rustlib\x86_64-pc-windows-gnu\lib Other than that it works.
- JoshTriplett 11y agoDepends on the 2d graphics you want. There are Rust bindings for GTK+3 if you want a toolkit, or bindings for Cairo if you want raw 2d graphics.