First implementation of SSBO, vertex pulling

This commit is contained in:
2025-11-10 11:58:11 +00:00
parent 187751ec26
commit 5e93c7631d
7 changed files with 201 additions and 131 deletions
+3 -6
View File
@@ -1,4 +1,4 @@
module GLHelp where
module GLHelp (mglCreate,mglDelete,checkGLError) where
import Foreign.Marshal
import Foreign.Ptr
@@ -6,13 +6,10 @@ import Foreign.Storable
import Graphics.GL.Core45
mglCreate :: (GLsizei -> Ptr GLuint -> IO ()) -> IO GLuint
mglCreate f =
alloca $ \nameptr -> do
f 1 nameptr
peek nameptr
mglCreate f = alloca $ \ptr -> f 1 ptr >> peek ptr
mglDelete :: (GLsizei -> Ptr GLuint -> IO ()) -> GLuint -> IO ()
mglDelete f i = with i $ \ptr -> f 1 ptr
mglDelete f i = with i $ f 1
checkGLError :: String -> IO ()
checkGLError s = do