Make Shapes use Streaming rather than Vector streaming
This commit is contained in:
+1
-1
@@ -42,8 +42,8 @@ initialAnoTree = OnwardList
|
||||
$ intersperse (AnTree corDoor)
|
||||
[ IntAnno $ AnTree . startRoom
|
||||
, AnRoom $ return airlock0
|
||||
, AnRoom $ roomCCrits 10
|
||||
, AnRoom slowDoorRoom
|
||||
, AnRoom $ roomCCrits 10
|
||||
, AnTree firstBreather
|
||||
, AnTree $ telRoomLev 1 >>= rToOnward "telRoomLev" . pure . cleatOnward
|
||||
]
|
||||
|
||||
@@ -99,7 +99,7 @@ teslaGun = defaultBatteryGun
|
||||
teslaGunPic :: Item -> SPic
|
||||
teslaGunPic _ = noPic $ colorSH blue $
|
||||
upperPrismPoly 5 (rectNESW xb 8 xa 0)
|
||||
++ upperPrismPoly 5 (rectNESW (-xa) 8 (-xb) 0)
|
||||
<> upperPrismPoly 5 (rectNESW (-xa) 8 (-xb) 0)
|
||||
where
|
||||
xa = 1
|
||||
xb = 9
|
||||
|
||||
@@ -302,7 +302,7 @@ miniGunXPict i spin _ =
|
||||
)
|
||||
where
|
||||
aBarrel = translateSH (V3 15 2 2) baseCaneShape
|
||||
barrels = concatMap (\an -> aBarrel & rotateSHx (2*pi * fromIntegral an / fromIntegral i)) [1..i]
|
||||
barrels = foldMap (\an -> aBarrel & rotateSHx (2*pi * fromIntegral an / fromIntegral i)) [1..i]
|
||||
a = fromIntegral spin / 100
|
||||
--x = fromIntegral am / 10
|
||||
-- clip y z = translateSH (V3 0 (-1) z) (rotateSHx (negate $ pi/4)
|
||||
|
||||
@@ -41,7 +41,7 @@ shatterGun = defaultWeapon
|
||||
shatterGunSPic :: Item -> SPic
|
||||
shatterGunSPic _ = noPic $ colorSH blue $
|
||||
upperPrismPoly 5 (rectNESW xb 8 xa 0)
|
||||
++ upperPrismPoly 5 (rectNESW (-xa) 8 (-xb) 0)
|
||||
<> upperPrismPoly 5 (rectNESW (-xa) 8 (-xb) 0)
|
||||
where
|
||||
xa = 1
|
||||
xb = 9
|
||||
|
||||
@@ -56,7 +56,7 @@ flamerPic :: Item -> SPic
|
||||
flamerPic it =
|
||||
( colorSH yellow $
|
||||
translateSHf tx ty (upperPrismPoly tz $ polyCirc 3 r)
|
||||
++ upperPrismPoly 5 (rectNESW 2 18 (-2) 0)
|
||||
<> upperPrismPoly 5 (rectNESW 2 18 (-2) 0)
|
||||
, color black $ translate3 (V3 tx ty (tz+0.01)) $ circleSolid (r * am)
|
||||
)
|
||||
where
|
||||
|
||||
+15
-15
@@ -51,21 +51,21 @@ doDrawing pdata u = do
|
||||
let (ws,wp) = wallSPics <> worldSPic cfig w
|
||||
( (nWalls, nWins , nFls),(nShapeVs, nIndices, nSilIndices) )
|
||||
<- MP.bindM3 (\ _ wlwifl counts -> return (wlwifl,counts))
|
||||
( pokeBindFoldableLayer shadV layerCounts wp)
|
||||
( pokeWallsWindowsFloor
|
||||
(shadVBOptr $ _wallTextureShader pdata)
|
||||
(shadVBOptr $ _windowShader pdata)
|
||||
(shadVBOptr $ _textureArrayShader pdata)
|
||||
wallPointsCol
|
||||
windowPoints
|
||||
(_floorTiles w)
|
||||
)
|
||||
( pokeShape
|
||||
(_vboPtr $ _vaoVBO $ _shadVAO $ _shapeShader pdata)
|
||||
(_eboPtr $ _shapeEBO pdata)
|
||||
(_eboPtr $ _silhouetteEBO pdata)
|
||||
ws
|
||||
)
|
||||
( pokeBindFoldableLayer shadV layerCounts wp)
|
||||
( pokeWallsWindowsFloor
|
||||
(shadVBOptr $ _wallTextureShader pdata)
|
||||
(shadVBOptr $ _windowShader pdata)
|
||||
(shadVBOptr $ _textureArrayShader pdata)
|
||||
wallPointsCol
|
||||
windowPoints
|
||||
(_floorTiles w)
|
||||
)
|
||||
( pokeShape
|
||||
(_vboPtr $ _vaoVBO $ _shadVAO $ _shapeShader pdata)
|
||||
(_eboPtr $ _shapeEBO pdata)
|
||||
(_eboPtr $ _silhouetteEBO pdata)
|
||||
ws
|
||||
)
|
||||
-- bind wall points, silhouette data, surface geometry
|
||||
uncurry bindShaderBuffers $ unzip
|
||||
[ ( _wallTextureShader pdata, nWalls)
|
||||
|
||||
@@ -81,7 +81,7 @@ extraPics cfig w = pictures (_decorations w)
|
||||
<> concatMapPic clDraw (_clouds w )
|
||||
<> concatMapPic ppDraw (_pressPlates w )
|
||||
<> viewClipBounds cfig w
|
||||
-- <> debugDraw cfig w
|
||||
<> debugDraw cfig w
|
||||
|
||||
debugDraw :: Configuration -> World -> Picture
|
||||
{-# INLINE debugDraw #-}
|
||||
|
||||
Reference in New Issue
Block a user