From 599cde356b576759475d34dbfadb5548926c089d Mon Sep 17 00:00:00 2001 From: kitty piapiac Date: Tue, 18 Apr 2023 18:29:03 -0700 Subject: input init --- scene-title.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'scene-title.c') 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();} -- cgit v1.2.3