put error printing in place
This commit is contained in:
parent
2ad52f5ba2
commit
1a924e70ef
1 changed files with 5 additions and 0 deletions
|
@ -135,6 +135,8 @@ main = do
|
|||
|
||||
sp <- createShaderProgram vertSrc fragSrc
|
||||
GL.currentProgram $= Just sp
|
||||
err <- get GL.errors
|
||||
print $ "pre-loop errors: " <> show err
|
||||
|
||||
-- -- EVENTING AND DRAWING
|
||||
|
||||
|
@ -159,7 +161,10 @@ main = do
|
|||
GL.clear [GL.ColorBuffer]
|
||||
|
||||
-- the actual drawing happens here
|
||||
void $ get GL.errors
|
||||
GL.drawElements GL.Triangles 6 GL.UnsignedInt nullPtr
|
||||
err <- get GL.errors
|
||||
when (not $ null err) (print $ "loop errors: " <> show err)
|
||||
|
||||
-- make GL finish things up
|
||||
-- GL.flush
|
||||
|
|
Loading…
Reference in a new issue