Remove redundant perspective' function master
authorLuke Lau <luke_lau@icloud.com>
Mon, 8 Oct 2018 13:31:06 +0000 (14:31 +0100)
committerLuke Lau <luke_lau@icloud.com>
Mon, 8 Oct 2018 13:31:06 +0000 (14:31 +0100)
Main.hs

diff --git a/Main.hs b/Main.hs
index ce545a8ec9b7f98fda2c5f15e41f794d043a0f0c..60aec4b5e7fb8fe0bdd67608c7c2a1ea219b2cab 100644 (file)
--- a/Main.hs
+++ b/Main.hs
@@ -129,12 +129,3 @@ loadShader program shaderType file = do
   unless status $
     get (shaderInfoLog shader) >>= fail . ("shader failed " ++)
   attachShader program shader
-
-perspective' :: Float -> Float -> Float -> Float -> IO (GLmatrix Float)
-perspective' fov aspect zNear zFar =
-  let f = 1.0 / tan(fov)
-  in newMatrix RowMajor
-                [f / aspect, 0, 0, 0,
-                 0, f, 0, 0,
-                 0, 0, (zNear + zFar) / (zNear - zFar), -1,
-                 0, 0, (2 * zFar * zNear) / (zNear - zFar), 0]