Fix resetting of immutable chasm/floor data storage on new world load
This commit is contained in:
+4
-1
@@ -1,4 +1,4 @@
|
||||
module GLHelp (mglCreate,mglDelete,checkGLError) where
|
||||
module GLHelp (mglCreate,mglDelete,checkGLError,glCreate) where
|
||||
|
||||
import Foreign.Marshal
|
||||
import Foreign.Ptr
|
||||
@@ -8,6 +8,9 @@ import Graphics.GL.Core45
|
||||
mglCreate :: (GLsizei -> Ptr GLuint -> IO ()) -> IO GLuint
|
||||
mglCreate f = alloca $ \ptr -> f 1 ptr >> peek ptr
|
||||
|
||||
glCreate :: (GLsizei -> Ptr GLuint -> IO ()) -> Int -> IO [GLuint]
|
||||
glCreate f n = alloca $ \ptr -> f (fromIntegral n) ptr >> peekArray n ptr
|
||||
|
||||
mglDelete :: (GLsizei -> Ptr GLuint -> IO ()) -> GLuint -> IO ()
|
||||
mglDelete f i = with i $ f 1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user