diff options
author | Csaba Hruska <csaba.hruska@gmail.com> | 2017-05-28 18:51:24 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-28 18:51:24 -0600 |
commit | 211a9753d1494b92e73eafd60c0a45c8420fda2d (patch) | |
tree | f0f866f517bd2187994f241af971dff9acea31ef /src/LambdaCube/GL | |
parent | 46fedd26db1f5d3966b594bd9aa9ec92fb9d37ff (diff) | |
parent | a3394e523e694523b591e2e7d66a48192e74bdc3 (diff) |
Merge pull request #12 from deepfire/fix-space-leak-11
Fix space leak, as per #11
Diffstat (limited to 'src/LambdaCube/GL')
-rw-r--r-- | src/LambdaCube/GL/Input.hs | 6 | ||||
-rw-r--r-- | src/LambdaCube/GL/Mesh.hs | 2 |
2 files changed, 4 insertions, 4 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 |
diff --git a/src/LambdaCube/GL/Mesh.hs b/src/LambdaCube/GL/Mesh.hs index 1b1b823..2c9dcda 100644 --- a/src/LambdaCube/GL/Mesh.hs +++ b/src/LambdaCube/GL/Mesh.hs | |||
@@ -7,7 +7,7 @@ module LambdaCube.GL.Mesh ( | |||
7 | Mesh(..), | 7 | Mesh(..), |
8 | MeshPrimitive(..), | 8 | MeshPrimitive(..), |
9 | MeshAttribute(..), | 9 | MeshAttribute(..), |
10 | GPUMesh, | 10 | GPUMesh(..), GPUData(..), |
11 | meshData | 11 | meshData |
12 | ) where | 12 | ) where |
13 | 13 | ||