diff options
author | Csaba Hruska <csaba.hruska@gmail.com> | 2015-06-01 17:25:20 +0200 |
---|---|---|
committer | Csaba Hruska <csaba.hruska@gmail.com> | 2015-06-01 17:25:20 +0200 |
commit | 4286f0e3180b7f4b9bbf8263cbfa39c687f37d32 (patch) | |
tree | 49ede3233c0bbfd3cbcca0f0fafefd7385142fe4 /Backend/GL | |
parent | 801a0551e1846f6720729b22c4888a574967e16e (diff) |
improve error message
Diffstat (limited to 'Backend/GL')
-rw-r--r-- | Backend/GL/Backend.hs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Backend/GL/Backend.hs b/Backend/GL/Backend.hs index 9adff30..decf93c 100644 --- a/Backend/GL/Backend.hs +++ b/Backend/GL/Backend.hs | |||
@@ -225,7 +225,10 @@ compileProgram uniTrie p = do | |||
225 | (attributes,attributesType) <- queryStreams po | 225 | (attributes,attributesType) <- queryStreams po |
226 | print uniforms | 226 | print uniforms |
227 | print attributes | 227 | print attributes |
228 | when (uniformsType /= (toTrie $ programUniforms p) `unionL` (toTrie $ programInTextures p)) $ fail "shader program uniform input mismatch!" | 228 | when (uniformsType /= (toTrie $ programUniforms p) `unionL` (toTrie $ programInTextures p)) $ do |
229 | putStrLn $ "expected: " ++ show ((toTrie $ programUniforms p) `unionL` (toTrie $ programInTextures p)) | ||
230 | putStrLn $ "actual: " ++ show uniformsType | ||
231 | fail "shader program uniform input mismatch!" | ||
229 | when (attributesType /= fmap snd (toTrie $ programStreams p)) $ fail $ "shader program stream input mismatch! " ++ show (attributesType,fmap snd (toTrie $ programStreams p)) | 232 | when (attributesType /= fmap snd (toTrie $ programStreams p)) $ fail $ "shader program stream input mismatch! " ++ show (attributesType,fmap snd (toTrie $ programStreams p)) |
230 | -- the public (user) pipeline and program input is encoded by the slots, therefore the programs does not distinct the render and slot textures input | 233 | -- the public (user) pipeline and program input is encoded by the slots, therefore the programs does not distinct the render and slot textures input |
231 | let inUniNames = toTrie $ programUniforms p | 234 | let inUniNames = toTrie $ programUniforms p |