    
local elapsed_time = gh_utils.get_elapsed_time()


if (gh_vk.swapchain_has_changed() == 1) then
  winW, winH = gh_window.getsize(0)

  local aspect = winW / winH
  gh_camera.update_persp(camera, camera_params.fov, aspect, camera_params.znear, camera_params.zfar)
  gh_camera.set_viewport(camera, 0, 0, winW, winH)
  UpdateCameraTransform(ub1, camera)

end




gh_object.set_euler_angles(mesh, 90 + 10*math.cos(elapsed_time), 20*math.sin(elapsed_time),  10*math.sin(elapsed_time))
UpdateObjectTransform(ub1, mesh)

UpdateTessellationParams(ub1, g_tess_params.tess_level, g_tess_params.tess_level, 0.5, g_tess_params.bump_scale)


build_command_buffer(winW, winH)


    


