diff --git a/src/Main.hs b/src/Main.hs index cee5df1..de5c16f 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -135,6 +135,14 @@ main = do sp <- createShaderProgram vertSrc fragSrc GL.currentProgram $= Just sp + + -- -- UNIFORMS + + -- get the uniform's location out of the shader program + uniLoc <- get $ GL.uniformLocation sp "u_color" + -- write data to the uniform + GL.uniform uniLoc $= (GL.Color4 1 0.5 0 1 :: GL.Color4 GL.GLfloat) + err <- get GL.errors print $ "pre-loop errors: " <> show err