uniform work now

This commit is contained in:
nek0 2020-05-17 13:37:59 +02:00
parent d566595b1c
commit 5390c2c57d

View file

@ -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