Implement different shadow resolutions
This commit is contained in:
+8
-2
@@ -20,6 +20,7 @@ import Dodge.Base
|
||||
import Dodge.Creature.Action
|
||||
import Dodge.SoundLogic
|
||||
import Dodge.Inventory
|
||||
import Dodge.Config.Data
|
||||
import Geometry
|
||||
import Preload.Update
|
||||
|
||||
@@ -66,13 +67,18 @@ handleMouseWheelEvent mwev w = case _menuLayers w of
|
||||
| otherwise -> Just w
|
||||
_ -> Just w
|
||||
|
||||
{-
|
||||
Resets the world window size, and resizes the fbo that gets the light map drawn into it.
|
||||
-}
|
||||
handleResizeEvent :: WindowSizeChangedEventData -> World -> Maybe World
|
||||
handleResizeEvent sev = Just
|
||||
handleResizeEvent sev w = Just
|
||||
. set windowX (fromIntegral x)
|
||||
. set windowY (fromIntegral y)
|
||||
. over sideEffects ( resizeSpareFBO (fromIntegral x) (fromIntegral y) : )
|
||||
$ over sideEffects ( resizeSpareFBO (fromIntegral x `div` divRes) (fromIntegral y `div` divRes) : )
|
||||
w
|
||||
where
|
||||
V2 x y = windowSizeChangedEventSize sev
|
||||
divRes = w ^. config . shadow_resolution
|
||||
|
||||
handlePressedMouseButton :: MouseButton -> World -> Maybe World
|
||||
handlePressedMouseButton but w
|
||||
|
||||
Reference in New Issue
Block a user