Implement texture atlas, details on why it works unclear
This commit is contained in:
+6
-6
@@ -1,8 +1,7 @@
|
||||
{- |
|
||||
Contains the central drawing functions for the dodge loop. -}
|
||||
module Dodge.Render
|
||||
( module Dodge.Render.Picture
|
||||
, doDrawing
|
||||
( doDrawing
|
||||
)
|
||||
where
|
||||
import Dodge.Data
|
||||
@@ -39,10 +38,8 @@ import Data.Tuple.Extra
|
||||
import Graphics.Rendering.OpenGL hiding (color,scale,translate,rotate)
|
||||
import qualified SDL
|
||||
|
||||
{- |
|
||||
Central drawing function.
|
||||
Returns a 'Word32' that should give the number of ticks it took to evaluate.
|
||||
-}
|
||||
{- | Central drawing function.
|
||||
Returns a 'Word32' that should give the number of ticks it took to evaluate. -}
|
||||
doDrawing :: RenderData -> World -> IO Word32
|
||||
doDrawing pdata w = do
|
||||
sTicks <- SDL.ticks
|
||||
@@ -73,6 +70,9 @@ doDrawing pdata w = do
|
||||
-- the depth buffer is ready to be drawn on
|
||||
blendFuncSeparate $= ((SrcAlphaSaturate, OneMinusSrcAlpha), (Zero,One))
|
||||
renderBackground pdata rot camzoom trans wins
|
||||
|
||||
_ <- renderShader (_textureArrayShader pdata) (_floorTiles w)
|
||||
|
||||
-- draw the walls
|
||||
depthFunc $= Just Less
|
||||
if w ^. config . wall_textured
|
||||
|
||||
Reference in New Issue
Block a user