Hack partially working gui line to dropped items
This commit is contained in:
+15
-14
@@ -10,8 +10,8 @@ import Shader.Data
|
||||
import Shader.Parameters
|
||||
import Picture.Data
|
||||
|
||||
import Data.Maybe
|
||||
import Data.List
|
||||
--import Data.Maybe
|
||||
--import Data.List
|
||||
import Foreign
|
||||
import Control.Monad
|
||||
import qualified Control.Foldl as F
|
||||
@@ -35,15 +35,16 @@ pokeVertices
|
||||
-> IO Int
|
||||
pokeVertices toFs ptr stride n rt = foldM (pokeVertex ptr stride) n (toFs rt)
|
||||
|
||||
getterPicShad :: VertexType -> Getting a (PicShads a) a
|
||||
getterPicShad PolyV = psPoly
|
||||
getterPicShad PolyzV{} = psPolyz
|
||||
getterPicShad BezV{} = psBez
|
||||
getterPicShad TextV{} = psText
|
||||
getterPicShad ArcV{} = psArc
|
||||
getterPicShad EllV = psEll
|
||||
getterPicShad :: VertexType -> PicShads a -> a
|
||||
--{-# INLINE getterPicShad #-}
|
||||
getterPicShad PolyV = _psPoly
|
||||
getterPicShad PolyzV{} = _psPolyz
|
||||
getterPicShad BezV{} = _psBez
|
||||
getterPicShad TextV{} = _psText
|
||||
getterPicShad ArcV{} = _psArc
|
||||
getterPicShad EllV = _psEll
|
||||
|
||||
--setterPicShad :: VertexType -> ASetter
|
||||
setterPicShad :: VertexType -> ASetter (PicShads a) (PicShads a) a a
|
||||
setterPicShad PolyV = psPoly
|
||||
setterPicShad PolyzV{} = psPolyz
|
||||
setterPicShad BezV{} = psBez
|
||||
@@ -55,8 +56,8 @@ pokeVX' :: PicShads VShader -> PicShads Int -> Verx -> IO (PicShads Int)
|
||||
pokeVX' shads count vx = do
|
||||
let f = setterPicShad (_vxType vx)
|
||||
g = getterPicShad (_vxType vx)
|
||||
vshad = shads ^. g
|
||||
n = count ^. g
|
||||
vshad = g shads
|
||||
n = g count
|
||||
theVBO = _vaoVBO $ _vshaderVAO vshad
|
||||
ptr = _vboPointer theVBO
|
||||
stride = _vboStride theVBO
|
||||
@@ -69,8 +70,8 @@ pokeVX shads laycounts vx = do
|
||||
offset = _vxLayer vx
|
||||
counts = laycounts IM.! offset
|
||||
getF = getterPicShad theType
|
||||
vshad = shads ^. getF
|
||||
n = counts ^. getF
|
||||
vshad = getF shads
|
||||
n = getF counts
|
||||
theVBO = _vaoVBO $ _vshaderVAO vshad
|
||||
ptr = _vboPointer theVBO
|
||||
stride = _vboStride theVBO
|
||||
|
||||
Reference in New Issue
Block a user