summaryrefslogtreecommitdiff
path: root/src/LambdaCube
diff options
context:
space:
mode:
Diffstat (limited to 'src/LambdaCube')
-rw-r--r--src/LambdaCube/GL/Input.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/LambdaCube/GL/Input.hs b/src/LambdaCube/GL/Input.hs
index 011671f..30125d9 100644
--- a/src/LambdaCube/GL/Input.hs
+++ b/src/LambdaCube/GL/Input.hs
@@ -1,4 +1,4 @@
1{-# LANGUAGE FlexibleContexts, TypeSynonymInstances, FlexibleInstances #-} 1{-# LANGUAGE BangPatterns, FlexibleContexts, TypeSynonymInstances, FlexibleInstances #-}
2module LambdaCube.GL.Input where 2module LambdaCube.GL.Input where
3 3
4import Control.Applicative 4import Control.Applicative
@@ -117,7 +117,7 @@ addObject input slotName prim indices attribs uniformNames = do
117 , objCommands = cmdsRef 117 , objCommands = cmdsRef
118 } 118 }
119 119
120 modifyIORef (slotVector input ! slotIdx) $ \(GLSlot objs _ _) -> GLSlot (IM.insert index obj objs) V.empty Generate 120 modifyIORef' (slotVector input ! slotIdx) $ \(GLSlot objs _ _) -> GLSlot (IM.insert index obj objs) V.empty Generate
121 121
122 -- generate GLObjectCommands for the new object 122 -- generate GLObjectCommands for the new object
123 {- 123 {-
@@ -144,7 +144,7 @@ addObject input slotName prim indices attribs uniformNames = do
144 return obj 144 return obj
145 145
146removeObject :: GLStorage -> Object -> IO () 146removeObject :: GLStorage -> Object -> IO ()
147removeObject p obj = modifyIORef (slotVector p ! objSlot obj) $ \(GLSlot objs _ _) -> GLSlot (IM.delete (objId obj) objs) V.empty Generate 147removeObject p obj = modifyIORef (slotVector p ! objSlot obj) $ \(GLSlot !objs _ _) -> GLSlot (IM.delete (objId obj) objs) V.empty Generate
148 148
149enableObject :: Object -> Bool -> IO () 149enableObject :: Object -> Bool -> IO ()
150enableObject obj b = writeIORef (objEnabled obj) b 150enableObject obj b = writeIORef (objEnabled obj) b