	
   
local elapsed_time = gh_utils.get_elapsed_time()


-- Updates object transformation.
--
gh_object.set_euler_angles(triangle, 0, elapsed_time*33.0, 0)
UpdateObjectTransform(triangle, ub1)





---[[
if (gh_renderer.vk_swapchain_has_changed() == 1) then

  for i=0, swapchain_buffer_count-1 do
    local cmd = command_buffers[i + 1]
    build_command_buffer(cmd, i, winW, winH)
  end
	--print("demo - build_command_buffer() OK")

end  

-- Executes the command buffer
--
local swapchain_buffer_index = gh_renderer.vk_swapchain_get_current_buffer_index()
local cmd = command_buffers[swapchain_buffer_index + 1]
gh_renderer.command_list_execute(cmd)
--]]




--[[
local swapchain_buffer_index = gh_renderer.vk_swapchain_get_current_buffer_index()
local cmd = command_buffers[swapchain_buffer_index + 1]
build_command_buffer(cmd, swapchain_buffer_index, winW, winH)
gh_renderer.command_list_execute(cmd)
--]]

--print("command buffer submitted - swapchain_buffer_index: " .. swapchain_buffer_index)
--gh_utils.thread_sleep(20)



