diff options
Diffstat (limited to 'src/LambdaCube/GL/Input.hs')
-rw-r--r-- | src/LambdaCube/GL/Input.hs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/LambdaCube/GL/Input.hs b/src/LambdaCube/GL/Input.hs index 00b2773..c979e28 100644 --- a/src/LambdaCube/GL/Input.hs +++ b/src/LambdaCube/GL/Input.hs | |||
@@ -133,15 +133,14 @@ addObject input slotName prim indices attribs uniformNames = do | |||
133 | Just ic <- readIORef $ glInput p | 133 | Just ic <- readIORef $ glInput p |
134 | case icSlotMapInputToPipeline ic ! slotIdx of | 134 | case icSlotMapInputToPipeline ic ! slotIdx of |
135 | Nothing -> do | 135 | Nothing -> do |
136 | putStrLn $ " ** slot is not used!" | 136 | --putStrLn $ " ** slot is not used!" |
137 | return V.empty -- this slot is not used in that pipeline | 137 | return V.empty -- this slot is not used in that pipeline |
138 | Just pSlotIdx -> do | 138 | Just pSlotIdx -> do |
139 | putStrLn "slot is used!" | 139 | --putStrLn "slot is used!" |
140 | --where | 140 | --where |
141 | let emptyV = V.replicate (V.length $ glPrograms p) [] | 141 | let emptyV = V.replicate (V.length $ glPrograms p) [] |
142 | return $ emptyV // [(prgIdx,createObjectCommands (glTexUnitMapping p) topUnis obj (glPrograms p ! prgIdx))| prgIdx <- glSlotPrograms p ! pSlotIdx] | 142 | return $ emptyV // [(prgIdx,createObjectCommands (glTexUnitMapping p) topUnis obj (glPrograms p ! prgIdx))| prgIdx <- glSlotPrograms p ! pSlotIdx] |
143 | writeIORef cmdsRef cmds | 143 | writeIORef cmdsRef cmds |
144 | sortSlotObjects input | ||
145 | return obj | 144 | return obj |
146 | 145 | ||
147 | removeObject :: GLStorage -> Object -> IO () | 146 | removeObject :: GLStorage -> Object -> IO () |
@@ -154,7 +153,6 @@ setObjectOrder :: GLStorage -> Object -> Int -> IO () | |||
154 | setObjectOrder p obj i = do | 153 | setObjectOrder p obj i = do |
155 | writeIORef (objOrder obj) i | 154 | writeIORef (objOrder obj) i |
156 | modifyIORef (slotVector p ! objSlot obj) $ \(GLSlot objs sorted _) -> GLSlot objs sorted Reorder | 155 | modifyIORef (slotVector p ! objSlot obj) $ \(GLSlot objs sorted _) -> GLSlot objs sorted Reorder |
157 | sortSlotObjects p | ||
158 | 156 | ||
159 | objectUniformSetter :: Object -> Map GLUniformName InputSetter | 157 | objectUniformSetter :: Object -> Map GLUniformName InputSetter |
160 | objectUniformSetter = objUniSetter | 158 | objectUniformSetter = objUniSetter |