summaryrefslogtreecommitdiff
path: root/Backend/GL/Backend.hs
diff options
context:
space:
mode:
authorCsaba Hruska <csaba.hruska@gmail.com>2015-04-30 15:32:06 +0200
committerCsaba Hruska <csaba.hruska@gmail.com>2015-05-18 14:50:52 +0200
commit6c9ebf718fa388df8772cd023352eed575dc3668 (patch)
treee8a36a77fa543f6fa2045c63b486806483c14a3a /Backend/GL/Backend.hs
parent91f82aca82dc282d5630c1bddd8dc773c679cc76 (diff)
fix
Diffstat (limited to 'Backend/GL/Backend.hs')
-rw-r--r--Backend/GL/Backend.hs14
1 files changed, 7 insertions, 7 deletions
diff --git a/Backend/GL/Backend.hs b/Backend/GL/Backend.hs
index 7e6a9d4..9adff30 100644
--- a/Backend/GL/Backend.hs
+++ b/Backend/GL/Backend.hs
@@ -351,12 +351,12 @@ compileRenderTarget texs glTexs (RenderTarget targets) = do
351allocPipeline :: Pipeline -> IO GLPipeline 351allocPipeline :: Pipeline -> IO GLPipeline
352allocPipeline p = do 352allocPipeline p = do
353 let uniTrie = uniforms $ schemaFromPipeline p 353 let uniTrie = uniforms $ schemaFromPipeline p
354 smps <- V.mapM compileSampler $ samplers p 354 smps <- V.mapM compileSampler $ V.fromList $ samplers p
355 texs <- V.mapM compileTexture $ textures p 355 texs <- V.mapM compileTexture $ V.fromList $ textures p
356 trgs <- V.mapM (compileRenderTarget (textures p) texs) $ targets p 356 trgs <- V.mapM (compileRenderTarget (V.fromList $ textures p) texs) $ V.fromList $ targets p
357 prgs <- V.mapM (compileProgram uniTrie) $ programs p 357 prgs <- V.mapM (compileProgram uniTrie) $ V.fromList $ programs p
358 -- texture unit mapping ioref trie 358 -- texture unit mapping ioref trie
359 texUnitMapRefs <- T.fromList <$> mapM (\k -> (k,) <$> newIORef 0) (S.toList $ S.fromList $ concat $ V.toList $ V.map (T.keys . toTrie . programInTextures) $ programs p) 359 texUnitMapRefs <- T.fromList <$> mapM (\k -> (k,) <$> newIORef 0) (S.toList $ S.fromList $ concat $ V.toList $ V.map (T.keys . toTrie . programInTextures) $ V.fromList $ programs p)
360 let (cmds,st) = runState (mapM (compileCommand texUnitMapRefs smps texs trgs prgs) $ commands p) initCGState 360 let (cmds,st) = runState (mapM (compileCommand texUnitMapRefs smps texs trgs prgs) $ commands p) initCGState
361 input <- newIORef Nothing 361 input <- newIORef Nothing
362 -- default Vertex Array Object 362 -- default Vertex Array Object
@@ -367,9 +367,9 @@ allocPipeline p = do
367 , glSamplers = smps 367 , glSamplers = smps
368 , glTargets = trgs 368 , glTargets = trgs
369 , glCommands = cmds 369 , glCommands = cmds
370 , glSlotPrograms = V.map slotPrograms $ IR.slots p 370 , glSlotPrograms = V.map slotPrograms $ V.fromList $ IR.slots p
371 , glInput = input 371 , glInput = input
372 , glSlotNames = V.map (pack . slotName) $ IR.slots p 372 , glSlotNames = V.map (pack . slotName) $ V.fromList $ IR.slots p
373 , glVAO = vao 373 , glVAO = vao
374 , glTexUnitMapping = texUnitMapRefs 374 , glTexUnitMapping = texUnitMapRefs
375 } 375 }