summaryrefslogtreecommitdiff
path: root/GPURing.hs
diff options
context:
space:
mode:
Diffstat (limited to 'GPURing.hs')
-rw-r--r--GPURing.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/GPURing.hs b/GPURing.hs
index d5f46af..3002c9e 100644
--- a/GPURing.hs
+++ b/GPURing.hs
@@ -25,8 +25,8 @@ import LambdaCube.GL.Input hiding (createObjectCommands)
25-- > ringBuffer <- newRing capacity (VectorRing.new capacity) 25-- > ringBuffer <- newRing capacity (VectorRing.new capacity)
26type Update keys = (keys -> Writer [DSum AttributeKey GLUniformValue] ()) 26type Update keys = (keys -> Writer [DSum AttributeKey GLUniformValue] ())
27 27
28new :: Data keys => GLStorage -> (String -> String) -> Int -> IO (TargetBuffer (Update keys)) 28new :: Data keys => String -> GLStorage -> (String -> String) -> Int -> IO (TargetBuffer (Update keys))
29new storage toAttr sz = fix $ \retProxy -> do 29new streamName storage toAttr sz = fix $ \retProxy -> do
30 let paramProxy = paramProxy' retProxy 30 let paramProxy = paramProxy' retProxy
31 where paramProxy' :: io (targetbuffer (keys -> writer)) -> Proxy keys 31 where paramProxy' :: io (targetbuffer (keys -> writer)) -> Proxy keys
32 paramProxy' _ = Proxy 32 paramProxy' _ = Proxy
@@ -35,7 +35,7 @@ new storage toAttr sz = fix $ \retProxy -> do
35 gd0 <- uploadDynamicBuffer sz ps 35 gd0 <- uploadDynamicBuffer sz ps
36 let gd = gd0 { dPrimitive = LineStrip } 36 let gd = gd0 { dPrimitive = LineStrip }
37 Just keys <- return $ lookupAttrKeys (lookupAttributeKey gd . toAttr) 37 Just keys <- return $ lookupAttrKeys (lookupAttributeKey gd . toAttr)
38 obj <- addToObjectArray storage "Points" [] gd 38 obj <- addToObjectArray storage streamName [] gd
39 -- readIORef (objCommands obj) >>= mapM_ print 39 -- readIORef (objCommands obj) >>= mapM_ print
40 return TargetBuffer 40 return TargetBuffer
41 { syncBuffer = \mask -> do updateCommands storage obj mask 41 { syncBuffer = \mask -> do updateCommands storage obj mask