diff options
Diffstat (limited to 'src/LambdaCube/GL')
-rw-r--r-- | src/LambdaCube/GL/Input.hs | 6 |
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 #-} |
2 | module LambdaCube.GL.Input where | 2 | module LambdaCube.GL.Input where |
3 | 3 | ||
4 | import Control.Applicative | 4 | import 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 | ||
146 | removeObject :: GLStorage -> Object -> IO () | 146 | removeObject :: GLStorage -> Object -> IO () |
147 | removeObject p obj = modifyIORef (slotVector p ! objSlot obj) $ \(GLSlot objs _ _) -> GLSlot (IM.delete (objId obj) objs) V.empty Generate | 147 | removeObject p obj = modifyIORef (slotVector p ! objSlot obj) $ \(GLSlot !objs _ _) -> GLSlot (IM.delete (objId obj) objs) V.empty Generate |
148 | 148 | ||
149 | enableObject :: Object -> Bool -> IO () | 149 | enableObject :: Object -> Bool -> IO () |
150 | enableObject obj b = writeIORef (objEnabled obj) b | 150 | enableObject obj b = writeIORef (objEnabled obj) b |