SGdemo 1.0.1 → 1.1
raw patch · 2 files changed
+4/−3 lines, 2 filesdep ~GLUTdep ~OpenGL
Dependency ranges changed: GLUT, OpenGL
Files
- SGdemo.cabal +2/−2
- SGdemo.hs +2/−1
SGdemo.cabal view
@@ -1,5 +1,5 @@ name: SGdemo-version: 1.0.1+version: 1.1 synopsis: An example of using the SG and OpenGL libraries description: This program serves as a demonstration of the functions of the SG library (to be found on Hackage:@@ -14,7 +14,7 @@ maintainer: neil@twistedsquare.com copyright: Copyright (c) 2009, Neil Brown stability: Provisional-build-depends: base > 3 && < 5, SG, OpenGL < 2.3, GLUT < 2.2+build-depends: base > 3 && < 5, SG, GLUT >=2.2 && <2.3, OpenGL >=2.4 && <2.5 build-type: Simple executable: sgdemo
SGdemo.hs view
@@ -284,7 +284,7 @@ | (n, s) <- zip [0..] $ reverse strLines] draftColour, drawnColour, reflectColour, slColour, ssColour, llColour, lpColour,- textColour :: Color4 GLclampf+ textColour :: Color4 GLfloat textColour = Color4 0 0 0.5 0 -- For things relating to the cursor: draftColour = Color4 1 0 0 0@@ -374,6 +374,7 @@ return (Point2 ( (conv x / conv w) - 0.5 , negate (conv y / conv h) + 0.5)) + conv :: (Integral a, Num b) => a -> b conv = fromInteger . toInteger moveCursor p = do w <- readIORef world writeIORef world $ w { cursor = p }