setView :: Int -> Int -> IO ()
setView w h = do
  setVideoMode w h 16 [OpenGL, Resizable] >> return ()
  matrixMode $= Projection
  loadIdentity
  let r = (fromIntegral w / fromIntegral h)
  frustum (-r * 0.1) (r * 0.1) (-0.1) 0.1 0.1 100000
  matrixMode $= Modelview 0
  viewport $= (Position 0 0, Size (fromIntegral w) (fromIntegral h))
setView :: Int -> Int -> IO ()
setView w h = do
  setVideoMode w h 16 [OpenGL, Resizable] >> return ()
  matrixMode $= Projection
  loadIdentity
  let r = (fromIntegral w / fromIntegral h)
  frustum (-r * 0.1) (r * 0.1) (-0.1) 0.1 0.1 100000
  matrixMode $= Modelview 0
  viewport $= (Position 0 0, Size (fromIntegral w) (fromIntegral h))
setView w h = do
  setVideoMode w h 16 [OpenGL, Resizable] >> return ()
  matrixMode $= Projection
  loadIdentity
  let r = (fromIntegral w / fromIntegral h)
  frustum (-r * 0.1) (r * 0.1) (-0.1) 0.1 0.1 100000
  matrixMode $= Modelview 0
  viewport $= (Position 0 0, Size (fromIntegral w) (fromIntegral h))