packages feed

reactive-glut 0.0.3 → 0.0.4

raw patch · 3 files changed

+9/−9 lines, 3 filesdep ~reactive

Dependency ranges changed: reactive

Files

reactive-glut.cabal view
@@ -1,5 +1,5 @@ Name:                reactive-glut-Version:             0.0.3+Version:             0.0.4 Cabal-Version:       >= 1.2 Synopsis:            Connects Reactive and GLUT Category:            FRP, graphics@@ -25,7 +25,7 @@ Library   hs-Source-Dirs:      src   Extensions:-  Build-Depends:       base, old-time, OpenGL, GLUT, vector-space, reactive >= 0.8.6+  Build-Depends:       base, old-time, OpenGL, GLUT, vector-space, reactive >= 0.8.8   Exposed-Modules:                             FRP.Reactive.GLUT.Adapter   Other-Modules:
src/FRP/Reactive/GLUT/SimpleGL.hs view
@@ -91,8 +91,8 @@      -- colorMaterial $= Just (FrontAndBack,AmbientAndDiffuse)      -- colorMaterial $= Just (FrontAndBack,Specular) -     reshapeCallback $= Just resizeScene-+     reshapeCallback     $= Just resizeScene+     actionOnWindowClose $= MainLoopReturns      -- loadIdentity  @@ -103,12 +103,12 @@ -- go backward through the viewing transform to the XY plane. windowPoint :: Position -> IO (Double, Double) windowPoint (Position x y) = do Size w h <- get windowSize-                                return (f w x, f h y)+                                return (f w x, - f h y)  where   -- Scale and translate coordinate.  Put zero at the center, and give one   -- unit to 100 pixels.-  f _ z = realToFrac z-  -- f z maxZ = realToFrac (z - maxZ) / (100 * realToFrac maxZ)+  -- f _ z = realToFrac z+  f maxZ z = realToFrac (z - (maxZ `div` 2)) / 100   -- | Wrap an OpenGL rendering action, to clear the frame-buffer before
src/FRP/Reactive/GLUT/UI.hs view
@@ -1,4 +1,4 @@-{-# LANGUAGE FlexibleContexts #-}+{-# LANGUAGE FlexibleContexts, TypeFamilies #-} {-# OPTIONS -Wall #-} ---------------------------------------------------------------------- -- |@@ -39,6 +39,6 @@ data Key = Char Char | SpecialKey SpecialKey  -- | Integral tracking frame sampling-uiIntegral :: VectorSpace v TimeT =>+uiIntegral :: (VectorSpace v, Scalar v ~ TimeT) =>               (UI -> Behavior v) -> (UI -> Behavior v) uiIntegral = liftA2 integral framePass