rev: 3827f53bae88e48a594610914ba74b9512ead6dd tukan/testing/test_imgui.sc -rw-r--r-- 852 bytes View raw Log this file
3827f53bae88 — Leonard Ritter * more work on module system 3 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
using import glm
using import struct
using import enum
using import ..tukan.imgui
using import ..tukan.GUI
using import .testfragment


fn shader (uv)
    vec4 0.5

global frame-visible = true
global test-window-visible = true
inline main ()
    @@ 'on GUI.on-frame
    inline (time size)
        if test-window-visible
            ShowDemoWindow test-window-visible
        do
            SetNextWindowSize (vec2 430 450) ImGuiCond_FirstUseEver
            if (WithBegin "The Window" frame-visible)
                Button "Test"

    inline per-frame-setup (size pg-test frame)

    _ per-frame-setup shader

fn program ()
    render-fragment-shader main
        #debug = true
        #size = (ivec2 512)
        size = (ivec2 960 540)


static-if true
    program;
else
    define f
        compile
            typify program
            'O3

    f;