diff options
author | Joshua Rahm <joshua.rahm@colorado.edu> | 2014-04-23 14:25:59 -0600 |
---|---|---|
committer | Joshua Rahm <joshua.rahm@colorado.edu> | 2014-04-23 14:25:59 -0600 |
commit | e3a07ab4ccf65ddf052b483cf879f6a9bdd97720 (patch) | |
tree | f2806f605ec7d607813cb325c889307af379bab6 /Graphics/Glyph/GLMath.hs | |
parent | 4d62a6d631fb9703d818654c5b9722e747cfe190 (diff) | |
parent | 4319bad3c312545e56c236a0515d1c1e9cdbf03d (diff) | |
download | terralloc-e3a07ab4ccf65ddf052b483cf879f6a9bdd97720.tar.gz terralloc-e3a07ab4ccf65ddf052b483cf879f6a9bdd97720.tar.bz2 terralloc-e3a07ab4ccf65ddf052b483cf879f6a9bdd97720.zip |
Merge branch 'sun'
Diffstat (limited to 'Graphics/Glyph/GLMath.hs')
-rw-r--r-- | Graphics/Glyph/GLMath.hs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Graphics/Glyph/GLMath.hs b/Graphics/Glyph/GLMath.hs index 7b454e2..cd0fd53 100644 --- a/Graphics/Glyph/GLMath.hs +++ b/Graphics/Glyph/GLMath.hs @@ -92,6 +92,12 @@ module Graphics.Glyph.GLMath where sz, uz, -fz, 0, -(s<.>e) , -(u'<.>e), (f<.>e), 1 ) + orthoMatrix :: GLfloat -> GLfloat -> GLfloat -> GLfloat -> GLfloat -> GLfloat -> Mat4 GLfloat + orthoMatrix top bot right left near far = + Matrix4 (2 / (right-left), 0, 0, - (right + left) / (right - left), + 0, 2 / (top-bot), 0, - (top+bot) / (top-bot), + 0, 0, -2 / (far-near), - (far+near) / (far - near), + 0, 0, 0, 1) perspectiveMatrix :: GLfloat -> GLfloat -> GLfloat -> GLfloat -> Mat4 GLfloat {- as close to copied from glm as possible -} perspectiveMatrix fov asp zn zf = |