Work towards using mutable vectors for storing parameters
This commit is contained in:
+6
-2
@@ -24,6 +24,7 @@ import Graphics.Rendering.OpenGL hiding (Line,translate,scale,imageHeight,Polygo
|
||||
--import Data.Tuple.Extra
|
||||
import qualified Data.IntMap.Strict as IM
|
||||
import qualified SDL
|
||||
import qualified Data.Vector.Unboxed.Mutable as UMV
|
||||
|
||||
divideSize :: Int -> Size -> Size
|
||||
divideSize i (Size x y) = Size (div x $ fromIntegral i) (div y $ fromIntegral i)
|
||||
@@ -148,8 +149,11 @@ pokeBindFoldable
|
||||
-> IO (PicShads Int)
|
||||
pokeBindFoldable pdata m = do
|
||||
let shads = _pictureShaders pdata
|
||||
elist <- pokeVerxs (fmap (_vaoVBO . _vshaderVAO) shads) m
|
||||
bindShader shads elist
|
||||
counts <- UMV.replicate 6 0
|
||||
pokeVerxs (fmap (_vaoVBO . _vshaderVAO) shads) counts m
|
||||
shads' <- picShadToMV shads
|
||||
bindShader shads' counts
|
||||
elist <- vToPicShad counts
|
||||
return elist
|
||||
|
||||
zeroCounts :: PicShads Int
|
||||
|
||||
Reference in New Issue
Block a user