Use immutable storage for fullscreen vbo

This commit is contained in:
2023-03-21 12:47:02 +00:00
parent 9bba0a43a4
commit ba240723f3
13 changed files with 105 additions and 40 deletions
+3 -4
View File
@@ -21,10 +21,9 @@ pokeCloudVerx ptr cl nv i (dx, dy) =
where
V3 cx cy cz = _clPos cl
V2 x y = V2 cx cy - rad *.* V2 dx dy
rad = _clRad cl
V4 r g b a = case _clPict cl of
CloudColor _ _ col -> col
DrawGasCloud col -> col
CloudColor rad' fadet col = _clPict cl
(rad,V4 r g b a') = (rad'*_clRad cl, col)
a = a' * min 1 (fromIntegral (_clTimer cl) / fadet)
pokeCloudFloat :: Ptr Float -> Int -> Int -> Float -> IO ()
pokeCloudFloat ptr nv i = pokeElemOff ptr (nv * 16 + i)