Cleanup
This commit is contained in:
@@ -48,4 +48,4 @@ applyWorldConfig ::
|
||||
IO PreloadData
|
||||
applyWorldConfig cfig pdata = do
|
||||
setVol cfig
|
||||
renderData (pdataResizeUpdate cfig) pdata
|
||||
renderData (renderDataResizeUpdate cfig) pdata
|
||||
|
||||
+1
-5
@@ -6,6 +6,7 @@ module Dodge.Render (
|
||||
|
||||
--import qualified Data.Vector as V
|
||||
|
||||
import Dodge.WindowSize
|
||||
import Control.Lens
|
||||
import Control.Monad
|
||||
import qualified Control.Monad.Parallel as MP
|
||||
@@ -374,10 +375,5 @@ getDistortions cfig w
|
||||
setViewportSize :: Int -> Int -> IO ()
|
||||
setViewportSize x y = glViewport 0 0 (fromIntegral x) (fromIntegral y)
|
||||
|
||||
getWindowSize :: Integral a => (Configuration -> ResFactor) -> Configuration -> (a,a)
|
||||
getWindowSize f cfig = (g _windowX,g _windowY)
|
||||
where
|
||||
g h = fromIntegral $ round (h cfig) `div` resFactorNum (f cfig)
|
||||
|
||||
setViewportType :: (Configuration -> ResFactor) -> Configuration -> IO ()
|
||||
setViewportType f = uncurry (glViewport 0 0) . getWindowSize f
|
||||
|
||||
@@ -2,9 +2,7 @@ module Dodge.WindowSize where
|
||||
|
||||
import Dodge.Data.Config
|
||||
|
||||
getWindowSize :: Configuration -> (Int, Int)
|
||||
getWindowSize cfig = (x `div` divRes,y `div` divRes)
|
||||
getWindowSize :: Integral a => (Configuration -> ResFactor) -> Configuration -> (a,a)
|
||||
getWindowSize f cfig = (g _windowX,g _windowY)
|
||||
where
|
||||
x = round $ _windowX cfig
|
||||
y = round $ _windowY cfig
|
||||
divRes = resFactorNum $ _graphics_world_resolution cfig
|
||||
g h = fromIntegral $ round (h cfig) `div` resFactorNum (f cfig)
|
||||
|
||||
Reference in New Issue
Block a user