Continue shader refactor

This commit is contained in:
2023-04-13 00:43:01 +01:00
parent cd46998e05
commit f104b24e90
7 changed files with 40 additions and 39 deletions
+3 -3
View File
@@ -14,9 +14,9 @@ mglCreate f = do
mglDelete :: (GLsizei -> Ptr GLuint -> IO ()) -> GLuint -> IO ()
mglDelete f i = with i $ \ptr -> f 1 ptr
checkGLError :: IO ()
checkGLError = do
checkGLError :: String -> IO ()
checkGLError s = do
err <- glGetError
case err of
0 -> return ()
i -> error $ "OpenGL error: " ++ show i
i -> error $ "OpenGL error: " ++ show i ++ " - " ++ s