gruff 0.3.3 → 0.3.4
raw patch · 3 files changed
+17/−14 lines, 3 filesdep ~FTGLdep ~OpenGLdep ~gruff
Dependency ranges changed: FTGL, OpenGL, gruff
Files
- data/minimal.frag +1/−1
- gruff.cabal +7/−5
- src/Shader.hs +9/−8
data/minimal.frag view
@@ -12,7 +12,7 @@ float t = texture2D(tt, gl_TexCoord[0].st).x; vec4 c = vec4(interior, 1.0); if (i > 0.0) {- float k = clamp(0.5 + 0.5 * log2(0.5 * d), 0.0, 1.0);+ float k = tanh(clamp(d, 0.0, 4.0)); c.rgb = mix(border, exterior, k); } gl_FragColor = c;
gruff.cabal view
@@ -1,5 +1,5 @@ Name: gruff-Version: 0.3.3+Version: 0.3.4 Synopsis: fractal explorer GUI using the ruff library Description: Mandelbrot Set fractal explorer using the ruff library.@@ -13,6 +13,8 @@ @cabal install gruff -fmpfr@. Note that the default setting for this flag has changed since gruff-0.2. .+ gruff-0.3.4 updates dependencies for ghc-7.8. Colouring is improved.+ . gruff-0.3.3 relaxes dependencies for ghc-7.6. . gruff-0.3.1 is a bugfix release, fixing a performance problem wherein@@ -111,16 +113,16 @@ Tile Utils View- Build-depends: gruff == 0.3.3,+ Build-depends: gruff == 0.3.4, base >= 4 && < 6, containers >= 0 && < 1, directory >= 1 && < 2, filepath >= 1 && < 2,- FTGL == 1.333,+ FTGL == 2.0, gtk >= 0.11 && < 0.13, gtkglext >= 0.11 && < 0.13, old-locale >= 1 && < 2,- OpenGL >= 2.4 && < 3,+ OpenGL >= 2.9 && < 2.10, OpenGLRaw >= 1.1 && < 2, parallel >= 3.1 && < 3.3, qd >= 1 && < 2,@@ -146,4 +148,4 @@ source-repository this type: git location: git://gitorious.org/ruff/gruff.git- tag: v0.3.3+ tag: v0.3.4
src/Shader.hs view
@@ -1,29 +1,30 @@ module Shader (shader) where +import qualified Data.ByteString as BS import Graphics.Rendering.OpenGL shader :: Maybe FilePath -> Maybe FilePath -> IO Program shader mV mF = do- [p] <- genObjectNames 1+ p <- createProgram vs <- case mV of Nothing -> return [] Just v -> do- [vert] <- genObjectNames 1- source <- readFile v- shaderSource vert $= [ source ]+ vert <- createShader VertexShader+ source <- BS.readFile v+ shaderSourceBS vert $= source compileShader vert -- print =<< get (shaderInfoLog vert) return [vert] fs <- case mF of Nothing -> return [] Just f -> do- [frag] <- genObjectNames 1- source <- readFile f- shaderSource frag $= [ source ]+ frag <- createShader FragmentShader+ source <- BS.readFile f+ shaderSourceBS frag $= source compileShader frag -- print =<< get (shaderInfoLog frag) return [frag]- attachedShaders p $= (vs, fs)+ attachedShaders p $= (vs ++ fs) linkProgram p -- print =<< get (programInfoLog p) return p