From 4bc8b759a6a2323f6ff6c3d4380ba6661743d9fa Mon Sep 17 00:00:00 2001 From: nek0 Date: Fri, 12 Jun 2020 20:13:36 +0200 Subject: [PATCH] add view and model matrices --- src/Main.hs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Main.hs b/src/Main.hs index 8f369bf..2dbc3e3 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -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