summaryrefslogtreecommitdiff
path: root/src/LambdaCube/GL/Backend.hs
diff options
context:
space:
mode:
authorCsaba Hruska <csaba.hruska@gmail.com>2016-02-12 17:07:41 +0100
committerCsaba Hruska <csaba.hruska@gmail.com>2016-02-12 17:07:41 +0100
commit5ca4d7845df57242e4a2c85030693faab9b17822 (patch)
tree6f76812ee47d184e01827ab4f3cba3e9c150013e /src/LambdaCube/GL/Backend.hs
parent4b51e6a96d528bad7aee1f1e30b1b0a1dc2998f0 (diff)
improve exceptions
Diffstat (limited to 'src/LambdaCube/GL/Backend.hs')
-rw-r--r--src/LambdaCube/GL/Backend.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/LambdaCube/GL/Backend.hs b/src/LambdaCube/GL/Backend.hs
index 40abc6d..1d910a2 100644
--- a/src/LambdaCube/GL/Backend.hs
+++ b/src/LambdaCube/GL/Backend.hs
@@ -217,11 +217,11 @@ compileProgram p = do
217 --putStr " + setup shader output mapping: " >> printGLStatus 217 --putStr " + setup shader output mapping: " >> printGLStatus
218 218
219 glLinkProgram po 219 glLinkProgram po
220 printProgramLog po 220 log <- printProgramLog po
221 221
222 -- check link status 222 -- check link status
223 status <- glGetProgramiv1 GL_LINK_STATUS po 223 status <- glGetProgramiv1 GL_LINK_STATUS po
224 when (status /= fromIntegral GL_TRUE) $ fail "link program failed!" 224 when (status /= fromIntegral GL_TRUE) $ fail $ unlines ["link program failed:",log]
225 225
226 -- check program input 226 -- check program input
227 (uniforms,uniformsType) <- queryUniforms po 227 (uniforms,uniformsType) <- queryUniforms po