Cleanup
This commit is contained in:
+1
-22
@@ -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 ()
|
||||
|
||||
@@ -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,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)
|
||||
|
||||
Reference in New Issue
Block a user