diff options
Diffstat (limited to 'PointPrimitiveRing.hs')
-rw-r--r-- | PointPrimitiveRing.hs | 7 |
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 | ||
87 | pushBack :: Ring keys -> (keys -> Writer [DSum AttributeKey GLUniformValue] a) -> IO () | 87 | pushBack :: 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 | ||
96 | updateBack :: Ring keys -> (keys -> Writer [DSum AttributeKey GLUniformValue] a) -> IO () | ||
97 | updateBack r attrs = do | ||
98 | back <- readIORef $ rBack r | ||
99 | updateAttributes (mod (back - 1) (ringCapacity r)) $ attrs (rKeys r) | ||
100 | |||
96 | updateRingUniforms :: GLStorage -> Ring keys -> IO () | 101 | updateRingUniforms :: GLStorage -> Ring keys -> IO () |
97 | updateRingUniforms _ _ = return () | 102 | updateRingUniforms _ _ = return () |