Remove tweakz shader
This commit is contained in:
@@ -8,7 +8,6 @@ module Picture.Base (
|
||||
blank,
|
||||
polygon,
|
||||
polygonWire,
|
||||
polygonZ,
|
||||
polygonCol,
|
||||
poly3,
|
||||
poly3Col,
|
||||
@@ -73,12 +72,6 @@ polygon = map f . polyToTris
|
||||
where
|
||||
f (V2 x y) = Verx (V3 x y 0) black [] BottomLayer polyNum
|
||||
|
||||
polygonZ :: [Point2] -> Float -> Picture
|
||||
{-# INLINE polygonZ #-}
|
||||
polygonZ ps z = map (f . zeroZ) $ polyToTris ps
|
||||
where
|
||||
f pos = Verx pos black [z] BottomLayer polyzNum
|
||||
|
||||
polygonCol :: [(Point2, RGBA)] -> Picture
|
||||
{-# INLINE polygonCol #-}
|
||||
polygonCol = polyToTris . map f
|
||||
|
||||
+6
-9
@@ -1,5 +1,5 @@
|
||||
{-# LANGUAGE DeriveGeneric #-}
|
||||
{-# LANGUAGE DeriveAnyClass #-}
|
||||
{-# LANGUAGE DeriveGeneric #-}
|
||||
{-# LANGUAGE StrictData #-}
|
||||
{-# LANGUAGE TemplateHaskell #-}
|
||||
|
||||
@@ -36,7 +36,6 @@ numLayers = length [minBound :: Layer .. maxBound]
|
||||
|
||||
data ShadNum
|
||||
= PolyShad
|
||||
| PolyzShad
|
||||
| BezShad
|
||||
| TextShad
|
||||
| ArcShad
|
||||
@@ -52,19 +51,17 @@ _unShadNum = fromEnum
|
||||
toShadNum :: Int -> ShadNum
|
||||
toShadNum = toEnum
|
||||
|
||||
polyNum, polyzNum, bezNum, textNum, arcNum, ellNum :: ShadNum
|
||||
polyNum, bezNum, textNum, arcNum, ellNum :: ShadNum
|
||||
{-# INLINE polyNum #-}
|
||||
{-# INLINE polyzNum #-}
|
||||
{-# INLINE bezNum #-}
|
||||
{-# INLINE textNum #-}
|
||||
{-# INLINE arcNum #-}
|
||||
{-# INLINE ellNum #-}
|
||||
polyNum = toShadNum 0
|
||||
polyzNum = toShadNum 1
|
||||
bezNum = toShadNum 2
|
||||
textNum = toShadNum 3
|
||||
arcNum = toShadNum 4
|
||||
ellNum = toShadNum 5
|
||||
bezNum = toShadNum 1
|
||||
textNum = toShadNum 2
|
||||
arcNum = toShadNum 3
|
||||
ellNum = toShadNum 4
|
||||
|
||||
type Picture = [Verx]
|
||||
|
||||
|
||||
@@ -133,8 +133,6 @@ preloadRender = do
|
||||
makeShader "dualTwoD/character" [vert, frag] [3, 4, 2] pmTriangles
|
||||
>>= _1 (vaddTextureNoFilter "data/texture/charMap.png")
|
||||
-- this should really be a 2d texture array
|
||||
basicTweakZShad <- makeShader "dualTwoD/basicTweakZ" [vert, frag] [4, 4] pmTriangles
|
||||
-- texture shaders, no textures attached
|
||||
|
||||
screentexturevbo <- mglCreate glCreateBuffers
|
||||
withArray (concat cornerList) $ \ptr ->
|
||||
@@ -196,12 +194,11 @@ preloadRender = do
|
||||
-- reset to default framebuffer, ready for drawing direct to screen
|
||||
glBindFramebuffer GL_FRAMEBUFFER 0
|
||||
|
||||
shadV <- MV.new 6
|
||||
shadV <- MV.new 5
|
||||
zipWithM_
|
||||
(MV.write shadV)
|
||||
[0 .. 5]
|
||||
[0 .. 4]
|
||||
[ bslist -- note the ordering is very important
|
||||
, basicTweakZShad -- ShadNum
|
||||
, bezierQuadShader
|
||||
, cslist
|
||||
, aslist
|
||||
|
||||
+4
-5
@@ -427,11 +427,10 @@ pokeLayVerx vbos counts vx = do
|
||||
pokeStride :: Int -> Int
|
||||
{-# INLINE pokeStride #-}
|
||||
pokeStride 0 = 7
|
||||
pokeStride 1 = 8
|
||||
pokeStride 2 = 11
|
||||
pokeStride 3 = 9
|
||||
pokeStride 4 = 10
|
||||
pokeStride 5 = 7
|
||||
pokeStride 1 = 11
|
||||
pokeStride 2 = 9
|
||||
pokeStride 3 = 10
|
||||
pokeStride 4 = 7
|
||||
pokeStride _ = undefined
|
||||
|
||||
poke34 :: Ptr Float -> Point3 -> Point4 -> IO ()
|
||||
|
||||
Reference in New Issue
Block a user