add view and model matrices
This commit is contained in:
parent
dc7162e407
commit
4bc8b759a6
1 changed files with 4 additions and 1 deletions
|
@ -115,6 +115,9 @@ main = do
|
|||
-- -- MATRICES
|
||||
|
||||
let proj = ortho 0 800 0 600 (-1) 1 :: M44 GL.GLfloat
|
||||
view = mkTransformationMat (identity :: M33 GL.GLfloat) (V3 (-100) 0 0)
|
||||
model = mkTransformationMat (identity :: M33 GL.GLfloat) (V3 200 200 0)
|
||||
mvp = proj !*! view !*! model
|
||||
|
||||
-- -- TEXTURE
|
||||
|
||||
|
@ -139,7 +142,7 @@ main = do
|
|||
-- -- tell the shader where to find the texture
|
||||
bind sp
|
||||
setUniform sp "u_texture" (texSlot tex)
|
||||
setUniform sp "u_mvp" proj
|
||||
setUniform sp "u_mvp" mvp
|
||||
|
||||
-- -- UNIFORMS
|
||||
|
||||
|
|
Loading…
Reference in a new issue