
local demo_dir = gh_utils.get_demo_dir()
local lib_dir = gh_utils.get_lib_dir() 		

dofile(lib_dir .. "lua/libfont/libfont1.lua")   





winW, winH = gh_window.getsize(0)


tex_prog = gh_node.getid("tex_prog")
-- gh_gpu_program.set_generic_vertex_attribs_state(tex_prog, 0)

color_prog = gh_node.getid("color_prog")
-- gh_gpu_program.set_generic_vertex_attribs_state(color_prog, 0)



camera_ortho = gh_camera.create_ortho(-winW/2, winW/2, -winH/2, winH/2, 1.0, 10.0)
gh_camera.set_viewport(camera_ortho, 0, 0, winW, winH)
gh_camera.set_position(camera_ortho, 0, 0, 4)


quad_size = 20
quad = gh_mesh.create_quad(quad_size, quad_size)


-- local abs_path = 0
-- letter_a = gh_texture.create_from_file("./letter_a.jpg", 0, abs_path)



gh_renderer.set_vsync(1)
gh_renderer.set_depth_test_state(0) -- No depth test for this demo


last_time = gh_utils.get_elapsed_time()




-- initial position
px = 100 
py = -50

-- move speed in pixels / seconds
move_speed_x = 100
move_speed_y = 120
