fwgl-glfw 0.1.0.3 → 0.1.0.4
raw patch · 2 files changed
+12/−8 lines, 2 filesdep ~basedep ~gl
Dependency ranges changed: base, gl
Files
- FWGL/Backend/GLFW/Common.hs +8/−4
- fwgl-glfw.cabal +4/−4
FWGL/Backend/GLFW/Common.hs view
@@ -39,9 +39,10 @@ setup :: ClientAPI -> Int -> Int -> (Int -> Int -> () -> IO state) -> (out -> () -> state -> IO state)- -> SF Input out+ -> IO inp+ -> SF (Input inp) out -> IO ()-setup clientAPI maj min initState draw sigf =+setup clientAPI maj min initState draw customInp sigf = do GLFW.init -- TODO: checks windowHint $ WindowHint'ClientAPI clientAPI windowHint $ WindowHint'ContextVersionMajor maj@@ -52,7 +53,8 @@ eventsRef <- newMVar H.empty drawStateRef <- initState w h () >>= newIORef- reactStateRef <- reactInit (return $ initInput w h)+ initCustom <- customInp+ reactStateRef <- reactInit (return $ initInput w h initCustom) (\_ _ -> actuate win drawStateRef) sigf setTime 0@@ -75,8 +77,10 @@ else threadDelay 16000 >> loop loop where refresh er rsf = do (Just tm) <- getTime+ custom <- customInp modifyMVar_ er $ \inp -> do- react rsf (tm * 1000, Just $ Input inp)+ react rsf ( tm * 1000+ , Just $ Input inp custom) return H.empty setTime 0
fwgl-glfw.cabal view
@@ -1,12 +1,12 @@ name: fwgl-glfw-version: 0.1.0.3+version: 0.1.0.4 synopsis: FWGL GLFW backend description: FWGL GLFW backend.-homepage: https://github.com/ZioCrocifisso/FWGL+homepage: https://github.com/ziocroc/FWGL stability: experimental license: BSD3 license-file: LICENSE-author: Luca "ZioCrocifisso" Prezzavento+author: Luca "ziocroc" Prezzavento maintainer: ziocroc@gmail.com category: Game, Game Engine build-type: Simple@@ -16,6 +16,6 @@ exposed-modules: FWGL.Backend.GLFW.GL20 other-modules: FWGL.Backend.OpenGL.Common, FWGL.Backend.GLFW.Common, FWGL.Backend.OpenGL.GL20 other-extensions: NullaryTypeClasses, TypeFamilies, MultiParamTypeClasses- build-depends: fwgl >= 0.1 && <0.2, base >=4.7 && <4.8, Yampa >=0.9 && <0.10, hashable >=1.2 && <1.3, unordered-containers >=0.2 && <0.3, vector >=0.10 && <0.11, transformers, gl >=0.6 && <0.7, JuicyPixels >=3.2 && <3.3, GLFW-b >=1.4 && <1.5+ build-depends: fwgl >= 0.1 && <0.2, base >=4.7 && <4.8, Yampa >=0.9 && <0.10, hashable >=1.2 && <1.3, unordered-containers >=0.2 && <0.3, vector >=0.10 && <0.11, transformers, gl >=0.6, JuicyPixels >=3.2 && <3.3, GLFW-b >=1.4 && <1.5 hs-source-dirs: . default-language: Haskell2010