diff options
author | kitty piapiac <kcp@bsd.computer> | 2023-04-18 18:29:03 -0700 |
---|---|---|
committer | kitty piapiac <kcp@bsd.computer> | 2023-04-18 18:29:03 -0700 |
commit | 599cde356b576759475d34dbfadb5548926c089d (patch) | |
tree | 0bb3459c0fe07cc421c4e0e93b197b9373f72487 /scene-title.c | |
parent | f1d602f5dcf862907affd1479eb3b2d132d7d639 (diff) |
input init
Diffstat (limited to 'scene-title.c')
-rw-r--r-- | scene-title.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/scene-title.c b/scene-title.c index 64429c5..527c686 100644 --- a/scene-title.c +++ b/scene-title.c @@ -5,6 +5,7 @@ #include"mino.h" #include"graph.h" #include"scene.h" +#include"input.h" _ mat4 win_proj; @@ -36,12 +37,13 @@ _ V title_init(V){ shader_tex_init(); tex_cat=graph_tex_create("res/tex/cat.jpg");} -_ V title_loop(V){/*prelude*/graph_before(),graph_events(); +_ V title_loop(V){/*prelude*/graph_before(),graph_events();InputPoint p; glm_ortho(0,graph_win_w,0,graph_win_h,0,4,win_proj), /*interlude*/ + p=input_point(), graph_shader_use(shader_tex),graph_shader_setM4("proj",win_proj), graph_tex_use(tex_cat,0), - graph_quad_xywh(graph_win_w/2.0,graph_win_h/2.0,256,256), + graph_quad_xywh(p.x,p.y,256,256), /*postlude*/ graph_after();} |