Correct loading of tile buffer when loading game
This commit is contained in:
@@ -149,8 +149,3 @@ doPreload = do
|
|||||||
, _soundData = SoundData{_loadedChunks = lChunks}
|
, _soundData = SoundData{_loadedChunks = lChunks}
|
||||||
, _musicData = MusicData{_loadedMusic = lMusic}
|
, _musicData = MusicData{_loadedMusic = lMusic}
|
||||||
}
|
}
|
||||||
|
|
||||||
--checkForGlErrors :: IO ()
|
|
||||||
--checkForGlErrors = do
|
|
||||||
-- errs <- errors
|
|
||||||
-- unless (null errs) $ putStrLn $ "GLerror during doLoop: " ++ unwords (map show errs)
|
|
||||||
|
|||||||
+4
-3
@@ -65,13 +65,14 @@ executables:
|
|||||||
main: Main.hs
|
main: Main.hs
|
||||||
source-dirs: appDodge
|
source-dirs: appDodge
|
||||||
ghc-options:
|
ghc-options:
|
||||||
|
- -eventlog
|
||||||
- -threaded
|
- -threaded
|
||||||
- -O2
|
- -O2
|
||||||
|
#- -eventlog
|
||||||
- -rtsopts
|
- -rtsopts
|
||||||
# - -eventlog
|
|
||||||
- -with-rtsopts=+RTS
|
- -with-rtsopts=+RTS
|
||||||
- -with-rtsopts=-N
|
- -with-rtsopts=-N2
|
||||||
#- -with-rtsopts=-l
|
- -with-rtsopts=-l
|
||||||
- -flate-dmd-anal
|
- -flate-dmd-anal
|
||||||
- -fno-liberate-case
|
- -fno-liberate-case
|
||||||
- -fno-state-hack
|
- -fno-state-hack
|
||||||
|
|||||||
@@ -2,10 +2,12 @@ module Dodge.Concurrent
|
|||||||
( hardQuit
|
( hardQuit
|
||||||
, addSideEffect
|
, addSideEffect
|
||||||
, conEffects
|
, conEffects
|
||||||
|
, blockingLoad
|
||||||
) where
|
) where
|
||||||
|
|
||||||
--import qualified Data.Set as S
|
--import qualified Data.Set as S
|
||||||
import Control.Lens
|
import Dodge.Menu.Loading
|
||||||
|
import LensHelp
|
||||||
import Dodge.Data.Universe
|
import Dodge.Data.Universe
|
||||||
import Data.Sequence (Seq (..))
|
import Data.Sequence (Seq (..))
|
||||||
|
|
||||||
@@ -32,6 +34,11 @@ addSideEffect f s = uvSideEffects %~ (|> NewSideEffect f s)
|
|||||||
|
|
||||||
hardQuit :: Universe -> Universe
|
hardQuit :: Universe -> Universe
|
||||||
hardQuit = uvSideEffects %~ (HardQuit <|)
|
hardQuit = uvSideEffects %~ (HardQuit <|)
|
||||||
|
|
||||||
|
blockingLoad :: String -> IO (Universe -> Maybe Universe) -> Universe -> Universe
|
||||||
|
blockingLoad str f u = u & uvScreenLayers .:~ loadingScreen str
|
||||||
|
& addSideEffect f str
|
||||||
|
|
||||||
--hardQuit = addSideEffect (return $ const Nothing) "QUITTING"
|
--hardQuit = addSideEffect (return $ const Nothing) "QUITTING"
|
||||||
|
|
||||||
--tryConcEffect :: Bool -> String -> IO (Universe -> Maybe Universe) -> Universe -> Universe
|
--tryConcEffect :: Bool -> String -> IO (Universe -> Maybe Universe) -> Universe -> Universe
|
||||||
|
|||||||
+12
-14
@@ -1,5 +1,5 @@
|
|||||||
{-# LANGUAGE DeriveGeneric #-}
|
|
||||||
{-# LANGUAGE DeriveAnyClass #-}
|
{-# LANGUAGE DeriveAnyClass #-}
|
||||||
|
{-# LANGUAGE DeriveGeneric #-}
|
||||||
{-# LANGUAGE StrictData #-}
|
{-# LANGUAGE StrictData #-}
|
||||||
{-# LANGUAGE TemplateHaskell #-}
|
{-# LANGUAGE TemplateHaskell #-}
|
||||||
|
|
||||||
@@ -13,24 +13,25 @@ module Dodge.Data.World (
|
|||||||
module Dodge.Data.Input,
|
module Dodge.Data.Input,
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import Geometry.Data
|
import Control.Lens
|
||||||
import Data.IntMap.Strict (IntMap)
|
import Data.IntMap.Strict (IntMap)
|
||||||
import Data.IntSet (IntSet)
|
import Data.IntSet (IntSet)
|
||||||
import Data.Set (Set)
|
|
||||||
import Dodge.Data.SaveSlot
|
|
||||||
import Control.Lens
|
|
||||||
import qualified Data.Map.Strict as M
|
import qualified Data.Map.Strict as M
|
||||||
|
import Data.Set (Set)
|
||||||
import Dodge.Data.CWorld
|
import Dodge.Data.CWorld
|
||||||
import Dodge.Data.Hammer
|
import Dodge.Data.Hammer
|
||||||
import Dodge.Data.Input
|
import Dodge.Data.Input
|
||||||
import Dodge.Data.RightButtonOptions
|
import Dodge.Data.RightButtonOptions
|
||||||
|
import Dodge.Data.SaveSlot
|
||||||
import Dodge.Data.SoundOrigin
|
import Dodge.Data.SoundOrigin
|
||||||
|
import Geometry.Data
|
||||||
import Sound.Data
|
import Sound.Data
|
||||||
import System.Random
|
import System.Random
|
||||||
|
|
||||||
data WorldEventFlag = InventoryChange
|
data WorldEventFlag
|
||||||
|
= InventoryChange
|
||||||
| CombineInventoryChange
|
| CombineInventoryChange
|
||||||
deriving (Eq,Ord,Enum,Bounded)
|
deriving (Eq, Ord, Enum, Bounded)
|
||||||
|
|
||||||
data World = World
|
data World = World
|
||||||
{ _cWorld :: CWorld
|
{ _cWorld :: CWorld
|
||||||
@@ -54,25 +55,22 @@ data World = World
|
|||||||
|
|
||||||
data TimeFlowStatus
|
data TimeFlowStatus
|
||||||
= DeathTime
|
= DeathTime
|
||||||
{ _deathDelay :: Int }
|
{_deathDelay :: Int}
|
||||||
| NormalTimeFlow
|
| NormalTimeFlow
|
||||||
| ScrollTimeFlow
|
| ScrollTimeFlow
|
||||||
{ _scrollSmoothing :: Int
|
{ _scrollSmoothing :: Int
|
||||||
, _reverseAmount :: Int
|
, _reverseAmount :: Int
|
||||||
, _futureWorlds :: [LWorld]
|
, _futureWorlds :: [LWorld]
|
||||||
, _scrollItemLocation :: Int
|
, _scrollItemLocation :: Int
|
||||||
}
|
}
|
||||||
| RewindLeftClick
|
| RewindLeftClick
|
||||||
{ _reverseAmount :: Int
|
{ _reverseAmount :: Int
|
||||||
, _scrollItemLocation :: Int
|
, _scrollItemLocation :: Int
|
||||||
}
|
}
|
||||||
| PausedTimeFlow
|
| PausedTimeFlow
|
||||||
{ _timeFlowCharge :: Int
|
{ _timeFlowCharge :: Int
|
||||||
, _scrollItemLocation :: Int
|
, _scrollItemLocation :: Int
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
-- deriving (Eq, Ord, Show, Read) --Generic, Flat)
|
|
||||||
|
|
||||||
makeLenses ''TimeFlowStatus
|
makeLenses ''TimeFlowStatus
|
||||||
makeLenses ''World
|
makeLenses ''World
|
||||||
|
|||||||
+53
-62
@@ -1,9 +1,9 @@
|
|||||||
module Dodge.Default.World where
|
module Dodge.Default.World where
|
||||||
|
|
||||||
import Control.Lens
|
import Control.Lens
|
||||||
import Dodge.Data.SelectionList
|
|
||||||
import Data.Graph.Inductive.Graph hiding ((&))
|
import Data.Graph.Inductive.Graph hiding ((&))
|
||||||
import qualified Data.Map as M
|
import qualified Data.Map as M
|
||||||
|
import Dodge.Data.SelectionList
|
||||||
import Dodge.Data.World
|
import Dodge.Data.World
|
||||||
import Geometry.Data
|
import Geometry.Data
|
||||||
import Geometry.Polygon
|
import Geometry.Polygon
|
||||||
@@ -146,12 +146,6 @@ defaultLWorld =
|
|||||||
, _lClock = 0
|
, _lClock = 0
|
||||||
}
|
}
|
||||||
|
|
||||||
--defaultDisplaySections :: SelectionSections a
|
|
||||||
--defaultDisplaySections = SelectionSections
|
|
||||||
-- { _sssSections = mempty
|
|
||||||
-- , _sssSelPos = Just (0,0)
|
|
||||||
-- }
|
|
||||||
|
|
||||||
defaultHUD :: HUD
|
defaultHUD :: HUD
|
||||||
defaultHUD =
|
defaultHUD =
|
||||||
HUD
|
HUD
|
||||||
@@ -163,72 +157,69 @@ defaultHUD =
|
|||||||
}
|
}
|
||||||
|
|
||||||
defaultDisplayInventory :: HUDElement
|
defaultDisplayInventory :: HUDElement
|
||||||
defaultDisplayInventory = DisplayInventory
|
defaultDisplayInventory =
|
||||||
{_subInventory = NoSubInventory
|
DisplayInventory
|
||||||
, _diSections = defaultInvSections
|
{ _subInventory = NoSubInventory
|
||||||
-- , _invRegex = Nothing
|
, _diSections = defaultInvSections
|
||||||
-- , _closeRegex = Nothing
|
}
|
||||||
}
|
|
||||||
--youLight :: TempLightSource
|
|
||||||
--youLight = TLS
|
|
||||||
-- { _tlsParam = LSParam
|
|
||||||
-- {_lsPos = V3 0 0 0
|
|
||||||
-- ,_lsRad = 300
|
|
||||||
-- ,_lsCol = 0.1
|
|
||||||
-- }
|
|
||||||
-- ,_tlsUpdate = \w _ -> Just (youLight & tlsParam . lsPos .~ f (_crPos $ you w))
|
|
||||||
-- ,_tlsTime = 0
|
|
||||||
-- }
|
|
||||||
-- where
|
|
||||||
-- f (V2 x y) = V3 x y 100
|
|
||||||
|
|
||||||
defaultSSSExtra :: SSSExtra
|
defaultSSSExtra :: SSSExtra
|
||||||
defaultSSSExtra = SSSExtra
|
defaultSSSExtra =
|
||||||
{_sssFilters = IM.fromList [(-1,mempty),(2,mempty)]
|
SSSExtra
|
||||||
,_sssSelPos = Nothing
|
{ _sssFilters = IM.fromList [(-1, mempty), (2, mempty)]
|
||||||
|
, _sssSelPos = Nothing
|
||||||
}
|
}
|
||||||
|
|
||||||
defaultInvSections :: SelectionSections ()
|
defaultInvSections :: SelectionSections ()
|
||||||
defaultInvSections = SelectionSections
|
defaultInvSections =
|
||||||
{ _sssSections = IM.fromDistinctAscList $ zip [-1..]
|
SelectionSections
|
||||||
[ defaultFiltSection
|
{ _sssSections =
|
||||||
, defaultInvSection
|
IM.fromDistinctAscList $
|
||||||
, defaultYouSection
|
zip
|
||||||
, defaultFiltSection & ssIndent .~ 2
|
[-1 ..]
|
||||||
& ssDescriptor .~ "NEARBY"
|
[ defaultFiltSection
|
||||||
, defaultCOSection
|
, defaultInvSection
|
||||||
]
|
, defaultYouSection
|
||||||
, _sssExtra = defaultSSSExtra
|
, defaultFiltSection & ssIndent .~ 2
|
||||||
}
|
& ssDescriptor .~ "NEARBY"
|
||||||
|
, defaultCOSection
|
||||||
|
]
|
||||||
|
, _sssExtra = defaultSSSExtra
|
||||||
|
}
|
||||||
|
|
||||||
defaultSS :: SelectionSection a
|
defaultSS :: SelectionSection a
|
||||||
defaultSS = SelectionSection
|
defaultSS =
|
||||||
{ _ssItems = mempty
|
SelectionSection
|
||||||
, _ssCursor = Nothing
|
{ _ssItems = mempty
|
||||||
, _ssMinSize = 10
|
, _ssCursor = Nothing
|
||||||
, _ssOffset = 0
|
, _ssMinSize = 10
|
||||||
, _ssShownItems = []
|
, _ssOffset = 0
|
||||||
, _ssIndent = 0
|
, _ssShownItems = []
|
||||||
, _ssDescriptor = ""
|
, _ssIndent = 0
|
||||||
}
|
, _ssDescriptor = ""
|
||||||
|
}
|
||||||
|
|
||||||
defaultCOSection :: SelectionSection ()
|
defaultCOSection :: SelectionSection ()
|
||||||
defaultCOSection = defaultSS
|
defaultCOSection =
|
||||||
& ssIndent .~ 2
|
defaultSS
|
||||||
& ssDescriptor .~ "CLOSE OBJECTS"
|
& ssIndent .~ 2
|
||||||
|
& ssDescriptor .~ "CLOSE OBJECTS"
|
||||||
|
|
||||||
defaultFiltSection :: SelectionSection a
|
defaultFiltSection :: SelectionSection a
|
||||||
defaultFiltSection = defaultSS
|
defaultFiltSection =
|
||||||
& ssIndent .~ 0
|
defaultSS
|
||||||
& ssDescriptor .~ "INV"
|
& ssIndent .~ 0
|
||||||
& ssMinSize .~ 0
|
& ssDescriptor .~ "INV"
|
||||||
|
& ssMinSize .~ 0
|
||||||
|
|
||||||
defaultInvSection :: SelectionSection ()
|
defaultInvSection :: SelectionSection ()
|
||||||
defaultInvSection = defaultSS
|
defaultInvSection =
|
||||||
& ssDescriptor .~ "INVENTORY ITEMS"
|
defaultSS
|
||||||
|
& ssDescriptor .~ "INVENTORY ITEMS"
|
||||||
|
|
||||||
defaultYouSection :: SelectionSection ()
|
defaultYouSection :: SelectionSection ()
|
||||||
defaultYouSection = defaultSS
|
defaultYouSection =
|
||||||
-- & ssRegex .~ UnavailableRegex
|
defaultSS
|
||||||
& ssIndent .~ 2
|
& ssIndent .~ 2
|
||||||
& ssMinSize .~ 1
|
& ssMinSize .~ 1
|
||||||
& ssDescriptor .~ "YOUR STATUS"
|
& ssDescriptor .~ "YOUR STATUS"
|
||||||
|
|||||||
+9
-10
@@ -9,6 +9,7 @@ module Dodge.Save (
|
|||||||
) where
|
) where
|
||||||
|
|
||||||
|
|
||||||
|
import Dodge.WorldLoad
|
||||||
import Dodge.Path.Translate
|
import Dodge.Path.Translate
|
||||||
import Data.Graph.Inductive (labEdges, labNodes)
|
import Data.Graph.Inductive (labEdges, labNodes)
|
||||||
import Dodge.Zoning.Pathing
|
import Dodge.Zoning.Pathing
|
||||||
@@ -41,22 +42,21 @@ writeSaveSlot ss u = do
|
|||||||
readSaveSlot :: SaveSlot -> IO (Universe -> Maybe Universe)
|
readSaveSlot :: SaveSlot -> IO (Universe -> Maybe Universe)
|
||||||
readSaveSlot ss = do
|
readSaveSlot ss = do
|
||||||
fExists <- doesFileExist $ saveSlotPath ss
|
fExists <- doesFileExist $ saveSlotPath ss
|
||||||
if fExists
|
if not fExists then error "Tried to read non-existant save file"
|
||||||
then do
|
else return ()
|
||||||
cwstr <- decodeFileStrict $ saveSlotPath ss
|
mcw <- decodeFileStrict $ saveSlotPath ss
|
||||||
case cwstr of
|
flip (maybe (error "Tried to read incorrectly encoded save file")) mcw $ \cw ->
|
||||||
Nothing -> putStrLn "loadSaveSlot failed to read saved file" >> return removescreenlayers
|
return $ \uv -> Just
|
||||||
Just cw -> return $ \uv -> Just $ uv & uvWorld . cWorld .~ cw
|
$ uv & uvWorld . cWorld .~ cw
|
||||||
& uvWorld %~ initWallZoning
|
& uvWorld %~ initWallZoning
|
||||||
& uvWorld . pnZoning .~ foldl' (flip zonePn) mempty
|
& uvWorld . pnZoning .~ foldl' (flip zonePn) mempty
|
||||||
(labNodes $ path uv)
|
(labNodes $ path uv)
|
||||||
& uvWorld . peZoning .~ foldl' (flip zonePe) mempty
|
& uvWorld . peZoning .~ foldl' (flip zonePe) mempty
|
||||||
(map fromEdgeTuple $ labEdges $ path uv)
|
(map fromEdgeTuple $ labEdges $ path uv)
|
||||||
& uvScreenLayers .~ []
|
& uvScreenLayers .~ []
|
||||||
else putStrLn "loadSaveSlot failed to find saved file" >> return removescreenlayers
|
& postUniverseLoadSideEffect
|
||||||
where
|
where
|
||||||
path uv = uv ^. uvWorld . cWorld . pathGraph
|
path uv = uv ^. uvWorld . cWorld . pathGraph
|
||||||
removescreenlayers = Just . (uvScreenLayers .~ [])
|
|
||||||
|
|
||||||
saveSlotPath :: SaveSlot -> String
|
saveSlotPath :: SaveSlot -> String
|
||||||
saveSlotPath (SaveSlotNum i) = "saveSlot/" ++ show i
|
saveSlotPath (SaveSlotNum i) = "saveSlot/" ++ show i
|
||||||
@@ -64,14 +64,13 @@ saveSlotPath QuicksaveSlot = "saveSlot/QuickSave"
|
|||||||
saveSlotPath (LevelStartSlot i) = "saveSlot/LevelStart" ++ show i
|
saveSlotPath (LevelStartSlot i) = "saveSlot/LevelStart" ++ show i
|
||||||
|
|
||||||
saveWorldInSlot :: SaveSlot -> Universe -> Universe
|
saveWorldInSlot :: SaveSlot -> Universe -> Universe
|
||||||
--saveWorldInSlot slot u = u & uvSideEffects %~ (|> NewSideEffect (writeSaveSlot slot u) "SAVING")
|
|
||||||
saveWorldInSlot slot u = u & addSideEffect (writeSaveSlot slot u) "SAVING"
|
saveWorldInSlot slot u = u & addSideEffect (writeSaveSlot slot u) "SAVING"
|
||||||
|
|
||||||
reloadLevelStart :: Universe -> Universe
|
reloadLevelStart :: Universe -> Universe
|
||||||
reloadLevelStart = loadSaveSlot (LevelStartSlot 0)
|
reloadLevelStart = loadSaveSlot (LevelStartSlot 0)
|
||||||
|
|
||||||
loadSaveSlot :: SaveSlot -> Universe -> Universe
|
loadSaveSlot :: SaveSlot -> Universe -> Universe
|
||||||
loadSaveSlot slot = addSideEffect (readSaveSlot slot) "LOADING"
|
loadSaveSlot slot = blockingLoad "LOADING SAVE" $ readSaveSlot slot
|
||||||
|
|
||||||
doQuicksave :: Universe -> Universe
|
doQuicksave :: Universe -> Universe
|
||||||
doQuicksave = saveWorldInSlot QuicksaveSlot
|
doQuicksave = saveWorldInSlot QuicksaveSlot
|
||||||
|
|||||||
+13
-15
@@ -3,14 +3,12 @@ module Dodge.StartNewGame (
|
|||||||
startSeedGame,
|
startSeedGame,
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import Dodge.WorldLoad
|
|
||||||
import Dodge.Menu.Loading
|
|
||||||
import Dodge.Concurrent
|
import Dodge.Concurrent
|
||||||
--import Dodge.Menu.Option
|
|
||||||
import LensHelp
|
|
||||||
import Dodge.Data.Universe
|
import Dodge.Data.Universe
|
||||||
import Dodge.LevelGen
|
import Dodge.LevelGen
|
||||||
import Dodge.Save
|
import Dodge.Save
|
||||||
|
import Dodge.WorldLoad
|
||||||
|
import LensHelp
|
||||||
import System.Random
|
import System.Random
|
||||||
|
|
||||||
startNewGameInSlot :: Int -> Universe -> Universe
|
startNewGameInSlot :: Int -> Universe -> Universe
|
||||||
@@ -18,20 +16,20 @@ startNewGameInSlot slot u = startSeedGame slot i u
|
|||||||
where
|
where
|
||||||
i = fst $ randomR (0, maxBound) (_randGen (_uvWorld u))
|
i = fst $ randomR (0, maxBound) (_randGen (_uvWorld u))
|
||||||
|
|
||||||
|
|
||||||
blockingLoad :: String -> IO (Universe -> Maybe Universe) -> Universe -> Universe
|
|
||||||
blockingLoad str f u = u & uvScreenLayers .:~ loadingScreen str
|
|
||||||
& addSideEffect f str
|
|
||||||
|
|
||||||
startSeedGame :: Int -> Int -> Universe -> Universe
|
startSeedGame :: Int -> Int -> Universe -> Universe
|
||||||
startSeedGame _ i u = blockingLoad "LOADING" (startSeedGameConc i $ u ^. preloadData) u
|
startSeedGame _ i u =
|
||||||
|
blockingLoad
|
||||||
|
("GENERATING FROM SEED " ++ show i)
|
||||||
|
(startSeedGameConc i $ u ^. preloadData)
|
||||||
|
u
|
||||||
|
|
||||||
startSeedGameConc :: Int -> PreloadData -> IO (Universe -> Maybe Universe)
|
startSeedGameConc :: Int -> PreloadData -> IO (Universe -> Maybe Universe)
|
||||||
startSeedGameConc seed pdata = do
|
startSeedGameConc seed pdata = do
|
||||||
w <- generateWorldFromSeed (pdata ^?! renderData) seed
|
w <- generateWorldFromSeed (pdata ^?! renderData) seed
|
||||||
writeFile "saveSlot/seed" $ show seed
|
writeFile "saveSlot/seed" $ show seed
|
||||||
return $ Just
|
return $
|
||||||
. saveWorldInSlot (LevelStartSlot 0)
|
Just
|
||||||
. (uvScreenLayers .~ [])
|
. saveWorldInSlot (LevelStartSlot 0)
|
||||||
. (uvWorld .~ w)
|
. (uvScreenLayers .~ [])
|
||||||
. (uvIOEffects %~ (\f uv -> (uvWorld . cWorld) (postWorldLoad (pdata ^?! renderData)) uv >>= f))
|
. (uvWorld .~ w)
|
||||||
|
. postUniverseLoadSideEffect
|
||||||
|
|||||||
+12
-7
@@ -1,17 +1,22 @@
|
|||||||
module Dodge.WorldLoad where
|
module Dodge.WorldLoad where
|
||||||
|
|
||||||
|
import Control.Lens
|
||||||
|
import Control.Monad
|
||||||
|
import Data.Preload.Render
|
||||||
|
import Dodge.Data.Universe
|
||||||
import Shader.Bind
|
import Shader.Bind
|
||||||
import Shader.Data
|
import Shader.Data
|
||||||
import Shader.Poke.Floor
|
import Shader.Poke.Floor
|
||||||
import Data.Preload.Render
|
|
||||||
import Dodge.Data.CWorld
|
postUniverseLoadSideEffect :: Universe -> Universe
|
||||||
import Control.Monad
|
postUniverseLoadSideEffect = (uvIOEffects %~ (\f uv -> (uvWorld . cWorld) (postWorldLoad (uv ^. preloadData . renderData)) uv >>= f))
|
||||||
import Control.Lens
|
|
||||||
|
|
||||||
postWorldLoad :: RenderData -> CWorld -> IO CWorld
|
postWorldLoad :: RenderData -> CWorld -> IO CWorld
|
||||||
postWorldLoad rdata cw = do
|
postWorldLoad rdata cw = do
|
||||||
nfloorvxs <- foldM (pokeTile (rdata ^. floorVBO . vboPtr))
|
nfloorvxs <-
|
||||||
0
|
foldM
|
||||||
(cw ^. cwTiles)
|
(pokeTile (rdata ^. floorVBO . vboPtr))
|
||||||
|
0
|
||||||
|
(cw ^. cwTiles)
|
||||||
bufferPokedVBO (rdata ^. floorVBO) nfloorvxs
|
bufferPokedVBO (rdata ^. floorVBO) nfloorvxs
|
||||||
return $ cw & numberFloorVerxs .~ nfloorvxs
|
return $ cw & numberFloorVerxs .~ nfloorvxs
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ module Preload.Render (
|
|||||||
cleanUpRenderPreload,
|
cleanUpRenderPreload,
|
||||||
) where
|
) where
|
||||||
|
|
||||||
|
import Control.Concurrent
|
||||||
import Shader.AuxAddition
|
import Shader.AuxAddition
|
||||||
import Shape.Data
|
import Shape.Data
|
||||||
import GLHelp
|
import GLHelp
|
||||||
@@ -33,6 +34,8 @@ preloadRender = do
|
|||||||
theUBO <- mglCreate glCreateBuffers
|
theUBO <- mglCreate glCreateBuffers
|
||||||
glNamedBufferData theUBO 64 nullPtr GL_STREAM_DRAW
|
glNamedBufferData theUBO 64 nullPtr GL_STREAM_DRAW
|
||||||
glBindBufferBase GL_UNIFORM_BUFFER 0 theUBO
|
glBindBufferBase GL_UNIFORM_BUFFER 0 theUBO
|
||||||
|
|
||||||
|
getNumCapabilities >>= print
|
||||||
|
|
||||||
-- orthonormalUBO <- mglCreate glCreateBuffers
|
-- orthonormalUBO <- mglCreate glCreateBuffers
|
||||||
-- withArray idMat $ \ptr ->
|
-- withArray idMat $ \ptr ->
|
||||||
|
|||||||
Reference in New Issue
Block a user