diff options
Diffstat (limited to 'src/LambdaCube/GL')
-rw-r--r-- | src/LambdaCube/GL/Backend.hs | 2 | ||||
-rw-r--r-- | src/LambdaCube/GL/Mesh.hs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/LambdaCube/GL/Backend.hs b/src/LambdaCube/GL/Backend.hs index 4280876..619ea76 100644 --- a/src/LambdaCube/GL/Backend.hs +++ b/src/LambdaCube/GL/Backend.hs | |||
@@ -627,7 +627,7 @@ setStorage' p@GLRenderer{..} input' = do | |||
627 | return (i,Nothing) | 627 | return (i,Nothing) |
628 | -- create input connection | 628 | -- create input connection |
629 | let sm = slotMap input | 629 | let sm = slotMap input |
630 | pToI = [i | n <- glSlotNames, let i = fromMaybe (error $ "missing object array: " ++ n) $ Map.lookup n sm] | 630 | pToI = [i | n <- glSlotNames, let i = fromMaybe (error $ "setStorage - missing object array: " ++ n) $ Map.lookup n sm] |
631 | iToP = V.update (V.replicate (Map.size sm) Nothing) (V.imap (\i v -> (v, Just i)) pToI) | 631 | iToP = V.update (V.replicate (Map.size sm) Nothing) (V.imap (\i v -> (v, Just i)) pToI) |
632 | writeIORef glInput $ Just $ InputConnection idx input pToI iToP | 632 | writeIORef glInput $ Just $ InputConnection idx input pToI iToP |
633 | 633 | ||
diff --git a/src/LambdaCube/GL/Mesh.hs b/src/LambdaCube/GL/Mesh.hs index 5c16e42..1b1b823 100644 --- a/src/LambdaCube/GL/Mesh.hs +++ b/src/LambdaCube/GL/Mesh.hs | |||
@@ -50,7 +50,7 @@ data GPUMesh | |||
50 | addMeshToObjectArray :: GLStorage -> String -> [String] -> GPUMesh -> IO Object | 50 | addMeshToObjectArray :: GLStorage -> String -> [String] -> GPUMesh -> IO Object |
51 | addMeshToObjectArray input slotName objUniNames (GPUMesh _ (GPUData prim streams indices _)) = do | 51 | addMeshToObjectArray input slotName objUniNames (GPUMesh _ (GPUData prim streams indices _)) = do |
52 | -- select proper attributes | 52 | -- select proper attributes |
53 | let (ObjectArraySchema slotPrim slotStreams) = fromMaybe (error $ "missing object array: " ++ slotName) $ Map.lookup slotName $! objectArrays $! schema input | 53 | let (ObjectArraySchema slotPrim slotStreams) = fromMaybe (error $ "addMeshToObjectArray - missing object array: " ++ slotName) $ Map.lookup slotName $! objectArrays $! schema input |
54 | filterStream n _ = Map.member n slotStreams | 54 | filterStream n _ = Map.member n slotStreams |
55 | addObject input slotName prim indices (Map.filterWithKey filterStream streams) objUniNames | 55 | addObject input slotName prim indices (Map.filterWithKey filterStream streams) objUniNames |
56 | 56 | ||