This commit is contained in:
2023-03-23 14:14:54 +00:00
parent 02ee4b01c9
commit ecd7a0fae0
6 changed files with 4 additions and 72 deletions
+1 -22
View File
@@ -16,17 +16,14 @@ import Data.Preload.Render
import qualified Data.Vector.Unboxed.Mutable as UMV
import Dodge.Data.Universe
import Dodge.Render.Lights
import Dodge.Render.Picture
import Dodge.Render.ShapePicture
import Dodge.Render.Walls
import Foreign
import Geometry
import Graphics.GL.Core45
import MatrixHelper
import Picture.Base
import Render
import qualified SDL
--import qualified SDL
import Shader
import Shader.Bind
import Shader.Data
@@ -87,7 +84,7 @@ doDrawing' win pdata u = do
ws
)
-- bind wall points, silhouette data, surface geometry
bindShaderLayers shadV layerCounts
bufferShaderLayers shadV layerCounts
uncurry (zipWithM_ bufferPokedVBO) $
unzip
[ (pdata ^. vboWalls, nWalls)
@@ -374,26 +371,8 @@ doDrawing' win pdata u = do
glBindBufferBase GL_UNIFORM_BUFFER 0 (pdata ^. orthonormalMatUBO)
renderLayer FixedCoordLayer shadV layerCounts
glDepthMask GL_TRUE
-- when (debugOn Show_ms_frame $ _uvConfig u) $
-- renderFoldable
-- (_pictureShaders pdata)
-- ( setDepth (-1)
-- . translate (-0.5) (-0.8)
-- . scale 0.0005 0.0005
-- $ fpsText (u ^. uvFrameTicks - u ^. uvLastFrameTicks)
-- )
SDL.glSwapWindow win
fpsText :: (Show a, Ord a, Num a) => a -> Picture
fpsText x = color col $ text $ "ms/frame " ++ show x
where
col
| x < 22 = blue
| x < 30 = green
| x < 40 = yellow
| x < 50 = orange
| otherwise = red
--------------------------------------------------------------------------------
-- note: currently assume there is only one UBO, we only bind it once at setup
--bufferUBO :: GLuint -> [Float] -> IO ()
-2
View File
@@ -14,8 +14,6 @@ import qualified Data.Set as Set
import Dodge.Base
import Dodge.Creature.Picture
import Dodge.Creature.Picture.Awareness
import Dodge.Data.Config
import Dodge.Data.World
import Dodge.Debug.Picture
import Dodge.Draw
import Dodge.Flare
-1
View File
@@ -1,6 +1,5 @@
module Dodge.TestString where
import Dodge.Render.ShapePicture
import Dodge.Render.Lights
import Data.Aeson (ToJSON)
import Data.ByteString.Lazy.Char8 (unpack)