I've decided to try Raylib with V. The installation process was very easy, but the bindings didn't work out of the box. I had to edit two source code files to fix some bugs and now it works with Raylib 3. Simple example:
module main
import MajorHard.vraylib
fn rgba(re int, gr int, bl int, al int) Color {
return Color{r: re, g: gr, b: bl, a: al}
}
fn main() {
mut x := 0
mut y := 0
vraylib.init_window(255, 255, "Test")
defer {
vraylib.close_window()
}
for {
if vraylib.window_should_close() {
break
}
vraylib.begin_drawing()
for x = 0; x < 255; x++ {
for y = 0; y < 255; y++ {
vraylib.draw_pixel(x, y, rgba(x, y, 255 - x, 255))
}
}
vraylib.end_drawing()
}
vraylib.take_screenshot("1.png")
}