-- Set up our scene, load assets, etc.
loadResources :: String -> IO Resources
loadResources path = do
  -- To draw the missiles, we also need a shader that can draw
  -- textures, and the actual missile texture
  solid    <- H.loadSolidShader
  textured <- H.loadTexturedShader
  missiletex <- H.loadTexture' path ("circle.png", H.texLoadDefaults)

  -- We'll use some square geometry and draw our texture on top
  vaoCache <- Map.fromList <$> traverse sequence
    [("square", H.mkSquareVAOObj 0.5 solid)
    ,("squaretex", H.mkSquareVAOObj 0.5 textured)]

  pure $ Resources missiletex vaoCache

-- This function calculates a view matrix, used during rendering
loadResources :: String -> IO Resources
loadResources path = do
  -- To draw the missiles, we also need a shader that can draw
  -- textures, and the actual missile texture
  solid    <- H.loadSolidShader
  textured <- H.loadTexturedShader
  missiletex <- H.loadTexture' path ("circle.png", H.texLoadDefaults)

  -- We'll use some square geometry and draw our texture on top
  vaoCache <- Map.fromList <$> traverse sequence
    [("square", H.mkSquareVAOObj 0.5 solid)
    ,("squaretex", H.mkSquareVAOObj 0.5 textured)]

  pure $ Resources missiletex vaoCache

-- This function calculates a view matrix, used during rendering
loadResources path = do
  -- To draw the missiles, we also need a shader that can draw
  -- textures, and the actual missile texture
  solid    <- H.loadSolidShader
  textured <- H.loadTexturedShader
  missiletex <- H.loadTexture' path ("circle.png", H.texLoadDefaults)

  -- We'll use some square geometry and draw our texture on top
  vaoCache <- Map.fromList <$> traverse sequence
    [("square", H.mkSquareVAOObj 0.5 solid)
    ,("squaretex", H.mkSquareVAOObj 0.5 textured)]

  pure $ Resources missiletex vaoCache

-- This function calculates a view matrix, used during rendering