1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

gg: migrate to sokol; examples: update tetris

This commit is contained in:
Alexander Medvednikov
2020-06-01 12:57:04 +02:00
parent 37e3cc0e72
commit 9bcbb3868f
6 changed files with 92 additions and 39 deletions

View File

@@ -38,8 +38,7 @@ fn main() {
sapp.run(&desc)
}
fn init(user_data voidptr) {
mut state := &AppState(user_data)
fn init(state mut AppState) {
// dont actually alocate this on the heap in real life
gfx.setup(&C.sg_desc{
mtl_device: sapp.metal_get_device()