Commit before attempting to stream worldSPic more effectively
This commit is contained in:
+4
-2
@@ -10,9 +10,9 @@ import Graphics.Rendering.OpenGL hiding (Line,translate,scale,imageHeight,Polygo
|
||||
import Foreign hiding (rotate)
|
||||
import qualified Data.Vector.Unboxed.Mutable as UMV
|
||||
import qualified Data.Vector.Mutable as MV
|
||||
import qualified Data.Vector.Fusion.Stream.Monadic as VS
|
||||
import Control.Monad.Primitive
|
||||
import Control.Monad
|
||||
import qualified Streaming.Prelude as S
|
||||
|
||||
bindArrayBuffers :: Int -> VBO -> IO ()
|
||||
{-# INLINABLE bindArrayBuffers #-}
|
||||
@@ -32,7 +32,9 @@ bindShaderLayers shads counts = MV.imapM_ f shads
|
||||
let theVBO = _vaoVBO $ _shadVAO shad
|
||||
stride = sum $ _vboAttribSizes theVBO
|
||||
bindBuffer ArrayBuffer $= (Just . _vbo $ theVBO)
|
||||
VS.mapM_ (g stride theVBO) $ VS.enumFromStepN 0 1 6 -- [0..5]
|
||||
--VS.mapM_ (g stride theVBO) $ VS.enumFromStepN 0 1 6 -- [0..5]
|
||||
S.mapM_ (g stride theVBO) $ S.each [0..5]
|
||||
|
||||
where
|
||||
g stride theVBO lay = do
|
||||
numVs <- UMV.unsafeRead counts $ lay * 6 + i
|
||||
|
||||
Reference in New Issue
Block a user