Use texture array for character rendering, condense rendering
This commit is contained in:
@@ -17,9 +17,29 @@ fixedCoordPictures u = drawMenuOrHUD cfig u
|
||||
<> drawConcurrentMessage u
|
||||
<> customMouseCursor cfig (u ^. uvWorld . input)
|
||||
<> listPicturesAt (halfWidth cfig) 0 cfig (map text (_uvTestString u u))
|
||||
<> displayFrameTicks u
|
||||
where
|
||||
cfig = _uvConfig u
|
||||
|
||||
displayFrameTicks :: Universe -> Picture
|
||||
displayFrameTicks u = if (debugOn Show_ms_frame $ _uvConfig u) then
|
||||
( setDepth (-1)
|
||||
. translate (-0.5) (-0.8)
|
||||
. scale 0.0005 0.0005
|
||||
$ fpsText (u ^. uvFrameTicks - u ^. uvLastFrameTicks)
|
||||
)
|
||||
else mempty
|
||||
|
||||
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
|
||||
|
||||
drawMenuOrHUD :: Configuration -> Universe -> Picture
|
||||
drawMenuOrHUD cfig u = case u ^. uvScreenLayers of
|
||||
[] -> drawHUD (u ^. uvConfig) (u ^. uvWorld)
|
||||
|
||||
Reference in New Issue
Block a user