First implementation of SSBO, vertex pulling
This commit is contained in:
+3
-6
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user