diff options
Diffstat (limited to 'GPURing.hs')
-rw-r--r-- | GPURing.hs | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -25,8 +25,8 @@ import LambdaCube.GL.Input hiding (createObjectCommands) | |||
25 | -- > ringBuffer <- newRing capacity (VectorRing.new capacity) | 25 | -- > ringBuffer <- newRing capacity (VectorRing.new capacity) |
26 | type Update keys = (keys -> Writer [DSum AttributeKey GLUniformValue] ()) | 26 | type Update keys = (keys -> Writer [DSum AttributeKey GLUniformValue] ()) |
27 | 27 | ||
28 | new :: Data keys => GLStorage -> (String -> String) -> Int -> IO (TargetBuffer (Update keys)) | 28 | new :: Data keys => String -> GLStorage -> (String -> String) -> Int -> IO (TargetBuffer (Update keys)) |
29 | new storage toAttr sz = fix $ \retProxy -> do | 29 | new 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 |