Skip to content

Commit

Permalink
fixup versioning
Browse files Browse the repository at this point in the history
  • Loading branch information
benl23x5 committed Nov 29, 2014
1 parent 55fb508 commit 43934bf
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 54 deletions.
85 changes: 43 additions & 42 deletions gloss-examples/gloss-examples.cabal
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Name: gloss-examples
Version: 1.8.2.1
Version: 1.9.1.1
License: MIT
License-file: LICENSE
Author: Ben Lippmeier
Expand All @@ -26,7 +26,7 @@ Executable gloss-bitmap
base == 4.7.*,
bytestring == 0.10.*,
bmp == 1.2.*,
gloss == 1.8.2.*
gloss == 1.9.1.*
Main-is: Main.hs
hs-source-dirs: picture/Bitmap
ghc-options: -threaded -O2
Expand All @@ -35,7 +35,7 @@ Executable gloss-bitmap
Executable gloss-boids
Build-depends:
base == 4.7.*,
gloss == 1.8.2.*
gloss == 1.9.1.*
Main-is: Main.hs
other-modules: KDTree2d Vec2
hs-source-dirs: picture/Boids
Expand All @@ -45,7 +45,7 @@ Executable gloss-boids
Executable gloss-clock
Build-depends:
base == 4.7.*,
gloss == 1.8.2.*
gloss == 1.9.1.*
Main-is: Main.hs
hs-source-dirs: picture/Clock
ghc-options: -threaded -O2
Expand All @@ -55,7 +55,7 @@ Executable gloss-conway
Build-depends:
base == 4.7.*,
vector == 0.10.*,
gloss == 1.8.2.*
gloss == 1.9.1.*
Main-is: Main.hs
other-modules: Cell World
hs-source-dirs: picture/Conway
Expand All @@ -64,8 +64,8 @@ Executable gloss-conway

Executable gloss-draw
Build-depends:
base == 4.7.*,
gloss == 1.8.2.*
base == 4.7.*,
gloss == 1.9.1.*
Main-is: Main.hs
hs-source-dirs: picture/Draw
ghc-options: -threaded -O2
Expand All @@ -74,7 +74,7 @@ Executable gloss-draw
Executable gloss-easy
Build-depends:
base == 4.7.*,
gloss == 1.8.2.*
gloss == 1.9.1.*
Main-is: Main.hs
hs-source-dirs: picture/Easy
ghc-options: -threaded -O2
Expand All @@ -83,8 +83,8 @@ Executable gloss-easy
Executable gloss-eden
Build-depends:
base == 4.7.*,
random == 1.0.*,
gloss == 1.8.2.*
random == 1.1.*,
gloss == 1.9.1.*
Main-is: Main.hs
other-modules: Cell Community World
hs-source-dirs: picture/Eden
Expand All @@ -94,7 +94,7 @@ Executable gloss-eden
Executable gloss-flake
Build-depends:
base == 4.7.*,
gloss == 1.8.2.*
gloss == 1.9.1.*
Main-is: Main.hs
hs-source-dirs: picture/Flake
ghc-options: -threaded -O2
Expand All @@ -103,7 +103,7 @@ Executable gloss-flake
Executable gloss-gameevent
Build-depends:
base == 4.7.*,
gloss == 1.8.2.*
gloss == 1.9.1.*
Main-is: Main.hs
hs-source-dirs: picture/GameEvent
ghc-options: -threaded -O2
Expand All @@ -112,7 +112,7 @@ Executable gloss-gameevent
Executable gloss-hello
Build-depends:
base == 4.7.*,
gloss == 1.8.2.*
gloss == 1.9.1.*
Main-is: Main.hs
hs-source-dirs: picture/Hello
ghc-options: -threaded -O2
Expand All @@ -121,8 +121,8 @@ Executable gloss-hello
Executable gloss-lifespan
Build-depends:
base == 4.7.*,
gloss == 1.8.2.*,
random == 1.0.*
gloss == 1.9.1.*,
random == 1.1.*
Main-is: Main.hs
other-modules: Cell Community World
hs-source-dirs: picture/Lifespan
Expand All @@ -132,7 +132,7 @@ Executable gloss-lifespan
Executable gloss-machina
Build-depends:
base == 4.7.*,
gloss == 1.8.2.*
gloss == 1.9.1.*
Main-is: Main.hs
hs-source-dirs: picture/Machina
ghc-options: -threaded -O2
Expand All @@ -141,8 +141,8 @@ Executable gloss-machina
Executable gloss-occlusion
Build-depends:
base == 4.7.*,
gloss == 1.8.2.*,
gloss-rendering
gloss == 1.9.1.*,
gloss-rendering == 1.9.1.*
Main-is: Main.hs
other-modules: Cell World State Data
hs-source-dirs: picture/Occlusion
Expand All @@ -154,7 +154,7 @@ Executable gloss-styrene
base == 4.7.*,
ghc-prim == 0.3.*,
containers == 0.5.*,
gloss == 1.8.2.*
gloss == 1.9.1.*
Main-is: Main.hs
other-modules: Actor Advance Collide Config Contact QuadTree World
hs-source-dirs: picture/Styrene
Expand All @@ -164,7 +164,7 @@ Executable gloss-styrene
Executable gloss-tree
Build-depends:
base == 4.7.*,
gloss == 1.8.2.*
gloss == 1.9.1.*
Main-is: Main.hs
hs-source-dirs: picture/Tree
ghc-options: -threaded -O2
Expand All @@ -174,7 +174,7 @@ Executable gloss-visibility
Build-depends:
base == 4.7.*,
vector == 0.10.*,
gloss == 1.8.2.*
gloss == 1.9.1.*
Main-is: Main.hs
other-modules: Draw Interface State World Geometry.Randomish Geometry.Segment
hs-source-dirs: picture/Visibility
Expand All @@ -184,17 +184,17 @@ Executable gloss-visibility
Executable gloss-zen
Build-depends:
base == 4.7.*,
gloss == 1.8.2.*
gloss == 1.9.1.*
Main-is: Main.hs
hs-source-dirs: picture/Zen
ghc-options: -threaded -O2


Executable gloss-crystal
Build-depends:
base == 4.7.*,
gloss == 1.8.2.*,
gloss-raster == 1.8.2.*
base == 4.7.*,
gloss == 1.9.1.*,
gloss-raster == 1.9.1.*
Main-is: Main.hs
hs-source-dirs: raster/Crystal
ghc-options:
Expand All @@ -211,8 +211,8 @@ Executable gloss-crystal
Executable gloss-ray
Build-depends:
base == 4.7.*,
gloss == 1.8.2.*,
gloss-raster == 1.8.2.*
gloss == 1.9.1.*,
gloss-raster == 1.9.1.*
Main-is: Main.hs
other-modules: Light Object Trace Vec3 World
hs-source-dirs: raster/Ray
Expand All @@ -227,8 +227,8 @@ Executable gloss-ray
Executable gloss-pulse
Build-depends:
base == 4.7.*,
gloss == 1.8.2.*,
gloss-raster == 1.8.2.*
gloss == 1.9.1.*,
gloss-raster == 1.9.1.*
Main-is: Main.hs
hs-source-dirs: raster/Pulse
ghc-options:
Expand All @@ -244,8 +244,8 @@ Executable gloss-wave
base == 4.7.*,
ghc-prim == 0.3.*,
vector == 0.10.*,
gloss == 1.8.2.*,
gloss-raster == 1.8.2.*
gloss == 1.9.1.*,
gloss-raster == 1.9.1.*
Main-is: Main.hs
hs-source-dirs: raster/Wave
ghc-options:
Expand All @@ -260,10 +260,10 @@ Executable gloss-fluid
base == 4.7.*,
ghc-prim == 0.3.*,
vector == 0.10.*,
repa == 3.2.*,
repa-io == 3.2.*,
repa-algorithms == 3.2.*,
gloss == 1.8.2.*
repa == 3.3.*,
repa-io == 3.3.*,
repa-algorithms == 3.3.*,
gloss == 1.9.1.*
Main-is: Main.hs
other-modules:
Args Config FieldElt Model UserEvent
Expand All @@ -284,8 +284,8 @@ Executable gloss-fluid
Executable gloss-snow
Build-depends:
base == 4.7.*,
repa == 3.2.*,
gloss == 1.8.2.*
repa == 3.3.*,
gloss == 1.9.1.*
Main-is: Main.hs
hs-source-dirs: raster/Snow
ghc-options:
Expand All @@ -299,8 +299,8 @@ Executable gloss-snow
Executable gloss-mandel
Build-depends:
base == 4.7.*,
repa == 3.2.*,
gloss == 1.8.2.*
repa == 3.3.*,
gloss == 1.9.1.*
Main-is: Main.hs
other-modules: Solver
hs-source-dirs: raster/Mandel
Expand All @@ -318,7 +318,7 @@ Executable gloss-graph
Build-depends:
base == 4.7.*,
containers == 0.5.*,
gloss == 1.8.2.*
gloss == 1.9.1.*
Main-is: Main.hs
hs-source-dirs: picture/Graph
ghc-options:
Expand All @@ -328,9 +328,10 @@ Executable gloss-render
Build-depends:
base == 4.7.*,
containers == 0.5.*,
GLFW-b,
gloss
gloss == 1.9.1.*,
GLFW-b
Main-is: Main.hs
hs-source-dirs: picture/Render
ghc-options:
-Wall -O2

19 changes: 14 additions & 5 deletions gloss-examples/picture/Render/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,29 @@
import "GLFW-b" Graphics.UI.GLFW as GLFW
import Control.Concurrent (threadDelay)
import Control.Monad (when, unless)

import Graphics.Gloss.Render
import Graphics.Gloss


main :: IO ()
main = do
let width = 200
height = 200

state <- stateInit

withWindow width height "Render" $ \win -> do
loop win (width, height)
where loop window (w, h) = do
loop state win (width, height)


where loop state window (w, h) = do
threadDelay 20000
pollEvents
render (w, h) white (Circle 80)
render state (w, h) white (Circle 80)
swapBuffers window
k <- keyIsPressed window Key'Escape
unless k $ loop window (w, h)
unless k $ loop state window (w, h)


withWindow :: Int -> Int -> String -> (GLFW.Window -> IO ()) -> IO ()
withWindow width height title f = do
Expand All @@ -37,9 +44,11 @@ withWindow width height title f = do
simpleErrorCallback e s =
putStrLn $ unwords [show e, show s]


keyIsPressed :: Window -> Key -> IO Bool
keyIsPressed win key = isPress `fmap` GLFW.getKey win key


isPress :: KeyState -> Bool
isPress KeyState'Pressed = True
isPress KeyState'Repeating = True
Expand Down
8 changes: 4 additions & 4 deletions gloss-raster/gloss-raster.cabal
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Name: gloss-raster
Version: 1.8.2.1
Version: 1.9.1.1
License: MIT
License-file: LICENSE
Author: Ben Lippmeier
Expand All @@ -25,9 +25,9 @@ Library
base == 4.7.*,
ghc-prim == 0.3.*,
containers == 0.5.*,
repa == 3.2.*,
gloss == 1.8.2.*,
gloss-rendering
repa == 3.3.*,
gloss == 1.9.1.*,
gloss-rendering == 1.9.1.*

ghc-options:
-Odph -fno-liberate-case
Expand Down
4 changes: 1 addition & 3 deletions gloss/Graphics/Gloss.hs
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,11 @@ module Graphics.Gloss
, display
, animate
, simulate
, play
, render)
, play)
where
import Graphics.Gloss.Data.Display
import Graphics.Gloss.Data.Picture
import Graphics.Gloss.Data.Color
import Graphics.Gloss.Render
import Graphics.Gloss.Interface.Pure.Display
import Graphics.Gloss.Interface.Pure.Animate
import Graphics.Gloss.Interface.Pure.Simulate
Expand Down

0 comments on commit 43934bf

Please sign in to comment.