GLFW-b 1.4.8.0 → 1.4.8.1
raw patch · 4 files changed
+37/−9 lines, 4 filesdep ~HUnitnew-uploaderPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: HUnit
API changes (from Hackage documentation)
Files
- GLFW-b.cabal +2/−2
- Graphics/UI/GLFW.hs +7/−1
- README.md +26/−2
- Test.hs +2/−4
GLFW-b.cabal view
@@ -1,5 +1,5 @@ name: GLFW-b-version: 1.4.8.0+version: 1.4.8.1 category: Graphics author: Brian Lewis <brian@lorf.org>@@ -66,7 +66,7 @@ main-is: Test.hs build-depends: GLFW-b,- HUnit == 1.2.*,+ HUnit == 1.3.*, base < 5, bindings-GLFW >= 3.1.2.0, test-framework == 0.8.*,
Graphics/UI/GLFW.hs view
@@ -494,7 +494,13 @@ -- | Creates a new window. -- Note: If running in GHCI don't forget to `:set -fno-ghci-sandbox` or you -- may run into an assertion failure, segfault or other nasty crash.-createWindow :: Int -> Int -> String -> Maybe Monitor -> Maybe Window -> IO (Maybe Window)+createWindow :: Int -- ^ Desired width for the window.+ -> Int -- ^ Desired height for the window.+ -> String -- ^ Desired title for the window.+ -> Maybe Monitor -- ^ Monitor to use in fullscreen mode.+ -> Maybe Window -- ^ Window for context object sharing, see+ -- <http://www.glfw.org/docs/latest/context.html#context_sharing here>.+ -> IO (Maybe Window) createWindow w h title mmon mwin = withCString title $ \ptitle -> do charFun <- newIORef nullFunPtr
README.md view
@@ -1,3 +1,9 @@+GLFW-b+======+[](http://hackage.haskell.org/package/GLFW-b)++## Description+ [Haskell][1] bindings to [GLFW][2], an Open Source, multi-platform library for creating windows with OpenGL contexts and managing input and events. @@ -6,15 +12,33 @@ For a demonstration of GLFW-b, see [GLFW-b-demo][5]. -When running GLFW-b in GHCI, don't forget to +When running GLFW-b in GHCI, don't forget to :set -fno-ghci-sandbox -since GHCI can (and might) run each line of your code in a fresh unbounded +since GHCI can (and might) run each line of your code in a fresh unbounded thread. +## Contributing++This package uses git-flow as development model, in short that means that:++1. New features should be added to "develop" branch.+2. "master" branch is reserved for stable releases.+3. Patches for bugs related with previous releases should always be done in+ "hotfixes" branch.+4. All merge commits to master from "hotfixes" should be done+ using the "--no-ff" flag and from "develop" should avoid merging commits.++Until we have a defined road-map we are going to leave out "release+"branches" and "feature branches". For more information about this development+model please refer to [this site.][6]++Thanks you, and happy coding.+ [1]: http://www.haskell.org/ [2]: http://www.glfw.org/ [3]: https://github.com/bsl/bindings-GLFW [4]: http://www.glfw.org/Version-3.1-released.html [5]: https://github.com/bsl/GLFW-b-demo+[6]: http://nvie.com/posts/a-successful-git-branching-model/
Test.hs view
@@ -15,8 +15,6 @@ -- GLFW-b import qualified Graphics.UI.GLFW as GLFW -import Debug.Trace- -------------------------------------------------------------------------------- main :: IO ()@@ -287,8 +285,8 @@ -- Window size and framebuffer size are not always equal, an example are -- retina screens. But maybe it's safe to assume they'll always be scaled -- equally in both dimensions?- let ww = fromIntegral fw / fromIntegral w- hh = fromIntegral fh / fromIntegral h+ let ww = ( fromIntegral fw / fromIntegral w ) :: Double+ hh = ( fromIntegral fh / fromIntegral h ) :: Double ww @?= hh assertBool "" $ fw /= 0 assertBool "" $ fh /= 0