summaryrefslogtreecommitdiff
path: root/PointPrimitiveRing.hs
diff options
context:
space:
mode:
Diffstat (limited to 'PointPrimitiveRing.hs')
-rw-r--r--PointPrimitiveRing.hs7
1 files changed, 6 insertions, 1 deletions
diff --git a/PointPrimitiveRing.hs b/PointPrimitiveRing.hs
index 3647d4a..c458421 100644
--- a/PointPrimitiveRing.hs
+++ b/PointPrimitiveRing.hs
@@ -81,7 +81,7 @@ updateRingCommands r = do
81 front | front > cnt -> [(front - cnt,size)] 81 front | front > cnt -> [(front - cnt,size)]
82 | otherwise -> [(0,back), (front,cnt - front)] 82 | otherwise -> [(0,back), (front,cnt - front)]
83 updateCommands (rStorage r) (rObject r) mask 83 updateCommands (rStorage r) (rObject r) mask
84 readIORef (objCommands $ rObject r) >>= mapM_ print 84 -- readIORef (objCommands $ rObject r) >>= mapM_ print
85 return () 85 return ()
86 86
87pushBack :: Ring keys -> (keys -> Writer [DSum AttributeKey GLUniformValue] a) -> IO () 87pushBack :: Ring keys -> (keys -> Writer [DSum AttributeKey GLUniformValue] a) -> IO ()
@@ -93,5 +93,10 @@ pushBack r attrs = do
93 when (sz < ringCapacity r) $ writeIORef (rSize r) (sz + 1) 93 when (sz < ringCapacity r) $ writeIORef (rSize r) (sz + 1)
94 updateRingCommands r 94 updateRingCommands r
95 95
96updateBack :: Ring keys -> (keys -> Writer [DSum AttributeKey GLUniformValue] a) -> IO ()
97updateBack r attrs = do
98 back <- readIORef $ rBack r
99 updateAttributes (mod (back - 1) (ringCapacity r)) $ attrs (rKeys r)
100
96updateRingUniforms :: GLStorage -> Ring keys -> IO () 101updateRingUniforms :: GLStorage -> Ring keys -> IO ()
97updateRingUniforms _ _ = return () 102updateRingUniforms _ _ = return ()