aboutsummaryrefslogtreecommitdiff
path: root/tests/glfw.amal
blob: e3c2fc63d3452bbb3cceb535a526af6129200db2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/usr/bin/env amalgam

extern const glfwInit: fn() i32;
extern const glfwTerminate: fn() i32; // should return void....
extern const glfwCreateWindow: fn(x: i32, y: i32, title: str, monitor: usize, share: usize) usize;
extern const glfwWindowShouldClose: fn(window: usize) i64;

const main = fn {
    glfwInit();
    const window = glfwCreateWindow(50, 50, "hello, world", 0, 0);
    while glfwWindowShouldClose(window) == 0 {

    }
    glfwTerminate();
    //const a = 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1;
}