GLFW-b 1.4.7.2 → 1.4.7.3
raw patch · 3 files changed
+17/−3 lines, 3 filesdep ~bindings-GLFW
Dependency ranges changed: bindings-GLFW
Files
- GLFW-b.cabal +3/−3
- Graphics/UI/GLFW.hs +7/−0
- README.md +7/−0
GLFW-b.cabal view
@@ -1,5 +1,5 @@ name: GLFW-b-version: 1.4.7.2+version: 1.4.7.3 category: Graphics author: Brian Lewis <brian@lorf.org>@@ -50,7 +50,7 @@ build-depends: base < 5,- bindings-GLFW >= 3.1.1.2+ bindings-GLFW >= 3.1.1.4 -------------------------------------------------------------------------------- @@ -68,7 +68,7 @@ GLFW-b, HUnit == 1.2.*, base < 5,- bindings-GLFW >= 3.1.1.2,+ bindings-GLFW >= 3.1.1.4, test-framework == 0.8.*, test-framework-hunit == 0.3.*
Graphics/UI/GLFW.hs view
@@ -81,6 +81,7 @@ , setFramebufferSizeCallback, FramebufferSizeCallback , pollEvents , waitEvents+ , postEmptyEvent -- * Input handling , Key (..)@@ -480,6 +481,9 @@ (WindowHint'OpenGLDebugContext x) -> (c'GLFW_OPENGL_DEBUG_CONTEXT, toC x) (WindowHint'OpenGLProfile x) -> (c'GLFW_OPENGL_PROFILE, toC x) +-- | 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 w h title mmon mwin = withCString title $ \ptitle -> do@@ -743,6 +747,9 @@ waitEvents :: IO () waitEvents = c'glfwWaitEvents >> executeScheduled++postEmptyEvent :: IO ()+postEmptyEvent = c'glfwPostEmptyEvent -------------------------------------------------------------------------------- -- Input handling
README.md view
@@ -6,6 +6,13 @@ For a demonstration of GLFW-b, see [GLFW-b-demo][5]. +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 +thread.+ [1]: http://www.haskell.org/ [2]: http://www.glfw.org/ [3]: https://github.com/bsl/bindings-GLFW