This commit is contained in:
2025-11-22 11:31:06 +00:00
parent a381633dc8
commit b1bd52b09e
4 changed files with 8 additions and 9 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
{-# LANGUAGE LambdaCase #-}
--{-# LANGUAGE LambdaCase #-}
module Dodge.Distortion (updateDistortion) where
+3 -3
View File
@@ -15,9 +15,9 @@ testEvent w = fromMaybe w $ do
--testEvent w = fromMaybe w $ do
cpos <- w ^? cWorld . lWorld . creatures . ix 0 . crPos . _xy
let distR = 50
t1 = (V2 1 (-1))
t2 = (V2 1 1)
t3 = (V2 distR 0)
t1 = V2 1 (-1)
t2 = V2 1 1
t3 = V2 distR 0
v3 = V3 t1 t2 t3
distortionBulge =
RadialDistortion
+3 -4
View File
@@ -13,13 +13,12 @@ import Foreign.Marshal
postUniverseLoadSideEffect :: Universe -> Universe
postUniverseLoadSideEffect =
uvIOEffects
%~ (\f uv -> (postWorldLoad (uv ^. preloadData . renderData) uv) >>= f)
uvIOEffects %~ (\f uv -> postWorldLoad (uv ^. preloadData . renderData) uv >>= f)
postWorldLoad :: RenderData -> Universe -> IO Universe
postWorldLoad rdata cw = do
let floorbo = (rdata ^. floorVBO . vboName)
floorptr = (rdata ^. floorVBO . vboPtr)
let floorbo = rdata ^. floorVBO . vboName
floorptr = rdata ^. floorVBO . vboPtr
chbo = rdata ^. chasmVBO . vboName
chptr = rdata ^. chasmVBO . vboPtr
glInvalidateBufferData floorbo
+1 -1
View File
@@ -83,7 +83,7 @@ preloadRender = do
ieptr <- mallocArray 65536 -- so we can go back to glushort...
cloudbo <- mglCreate glCreateBuffers
let cvsize = (sizeOf (0 :: Float)) * 4
let cvsize = sizeOf (0 :: Float) * 4
cloudbosize = fromIntegral cvsize * 65536 -- this should be changed
glNamedBufferStorage cloudbo cloudbosize nullPtr GL_DYNAMIC_STORAGE_BIT
glBindBufferBase GL_SHADER_STORAGE_BUFFER 6 cloudbo