packages feed

GLFW-b-demo 1.0.5 → 1.0.6

raw patch · 2 files changed

+14/−12 lines, 2 filesdep ~OpenGL

Dependency ranges changed: OpenGL

Files

GLFW-b-demo.cabal view
@@ -1,5 +1,5 @@ name:          GLFW-b-demo-version:       1.0.5+version:       1.0.6  author:        Brian Lewis <brian@lorf.org> maintainer:    Brian Lewis <brian@lorf.org>@@ -39,7 +39,7 @@    build-depends:     GLFW-b       == 1.4.*,-    OpenGL       == 2.8.*,+    OpenGL       >= 2.8 && < 2.10,     base          < 5,     mtl          == 2.1.*,     pretty       == 1.1.*,
src/Main.hs view
@@ -103,6 +103,8 @@         gear2 <- makeGear 0.5 2 2   10 0.7 (GL.Color4 0   0.8 0.2 1)  -- green         gear3 <- makeGear 1.3 2 0.5 10 0.7 (GL.Color4 0.2 0.2 1   1)  -- blue +        (fbWidth, fbHeight) <- GLFW.getFramebufferSize win+         let zDistClosest  = 10             zDistFarthest = zDistClosest + 20             zDist         = zDistClosest + ((zDistFarthest - zDistClosest) / 2)@@ -116,8 +118,8 @@               , envZDistFarthest = zDistFarthest               }             state = State-              { stateWindowWidth     = width-              , stateWindowHeight    = height+              { stateWindowWidth     = fbWidth+              , stateWindowHeight    = fbHeight               , stateXAngle          = 0               , stateYAngle          = 0               , stateZAngle          = 0@@ -262,13 +264,8 @@       (EventWindowPos _ x y) ->           printEvent "window pos" [show x, show y] -      (EventWindowSize _ width height) -> do+      (EventWindowSize _ width height) ->           printEvent "window size" [show width, show height]-          modify $ \s -> s-            { stateWindowWidth  = width-            , stateWindowHeight = height-            }-          adjustWindow        (EventWindowClose _) ->           printEvent "window close" []@@ -282,8 +279,13 @@       (EventWindowIconify _ is) ->           printEvent "window iconify" [show is] -      (EventFramebufferSize _ w h) ->-          printEvent "framebuffer size" [show w, show h]+      (EventFramebufferSize _ width height) -> do+          printEvent "framebuffer size" [show width, show height]+          modify $ \s -> s+            { stateWindowWidth  = width+            , stateWindowHeight = height+            }+          adjustWindow        (EventMouseButton _ mb mbs mk) -> do           printEvent "mouse button" [show mb, show mbs, showModifierKeys mk]