summaryrefslogtreecommitdiff
path: root/src/LambdaCube/GL/Backend.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/LambdaCube/GL/Backend.hs')
-rw-r--r--src/LambdaCube/GL/Backend.hs12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/LambdaCube/GL/Backend.hs b/src/LambdaCube/GL/Backend.hs
index 37b38c0..c682723 100644
--- a/src/LambdaCube/GL/Backend.hs
+++ b/src/LambdaCube/GL/Backend.hs
@@ -750,14 +750,16 @@ renderFrame glp = do
750 case input of 750 case input of
751 Nothing -> putStrLn "Warning: No pipeline input!" >> return () 751 Nothing -> putStrLn "Warning: No pipeline input!" >> return ()
752 Just ic -> do 752 Just ic -> do
753 GLSlot _ objs _ <- readIORef (slotVector (icInput ic) ! (icSlotMapPipelineToInput ic ! slotIdx)) 753 let draw obj = do
754 --putStrLn $ "Rendering " ++ show (V.length objs) ++ " objects" 754 enabled <- readIORef $ objEnabled obj
755 V.forM_ objs $ \(_,obj) -> do 755 when enabled $ do
756 enabled <- readIORef $ objEnabled obj
757 when enabled $ do
758 cmd <- readIORef $ objCommands obj 756 cmd <- readIORef $ objCommands obj
759 --putStrLn "Render object" 757 --putStrLn "Render object"
760 renderSlot ((cmd ! icId ic) ! progIdx) 758 renderSlot ((cmd ! icId ic) ! progIdx)
759 --putStrLn $ "Rendering " ++ show (V.length objs) ++ " objects"
760 readIORef (slotVector (icInput ic) ! (icSlotMapPipelineToInput ic ! slotIdx)) >>= \case
761 GLSlot _ objs Ordered -> forM_ objs $ draw . snd
762 GLSlot objMap _ _ -> forM_ objMap draw
761 {- 763 {-
762 GLSetSampler 764 GLSetSampler
763 GLSaveImage 765 GLSaveImage