This commit is contained in:
2023-03-24 12:06:54 +00:00
parent d524a14da4
commit bd9f32875e
7 changed files with 21 additions and 36 deletions
+1 -5
View File
@@ -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