packages feed

vacuum-opengl 0.0.1 → 0.0.2

raw patch · 2 files changed

+24/−5 lines, 2 filesdep +bitmapdep +bitmap-opengldep ~stb-imagePVP ok

version bump matches the API change (PVP)

Dependencies added: bitmap, bitmap-opengl

Dependency ranges changed: stb-image

API changes (from Hackage documentation)

Files

System/Vacuum/OpenGL/Server.hs view
@@ -20,6 +20,8 @@ import Graphics.UI.GLUT  import Codec.Image.STB+import Data.Bitmap.IO hiding (Size)+import Data.Bitmap.OpenGL  import System.Cmd import System.Directory@@ -141,6 +143,8 @@         Nothing -> return ()            b <- readMVar npot+      +{-             let myWithImage = if b then withImage else withExtendedImage                tex <- myWithImage img $ \p (x,y) c -> do@@ -160,8 +164,12 @@         texImage2D Nothing NoProxy 0 pif size 0 pdata         textureFilter Texture2D $= ((Linear',Nothing),Linear')         return tex+-}++      eimg <- if b then return img else extendImage img+      tex <- makeSimpleBitmapTexture eimg       -      putMVar theTexture $ Just (tex,resolution img)+      putMVar theTexture $ Just (tex, bitmapSize img)     --------------------------------------------------------------------------------@@ -218,7 +226,15 @@   nextPowerOfTwo :: Int -> Int       nextPowerOfTwo n = 2 ^ ( 1 + log2 (n-1) )-  ++-- extend the image to have power-of-two sizes, for old videocards+extendImage :: Image -> IO Image  +extendImage bm = do+  let (oldx,oldy) = bitmapSize bm+      (newx,newy) = (nextPowerOfTwo oldx, nextPowerOfTwo newx)+  copySubImage' bm (0,0) (oldx,oldy) (newx,newy) (0,0)++{-     -- extend the image to have power-of-two sizes withExtendedImage :: Image -> (Ptr Word8 -> (Int,Int) -> Int -> IO a) -> IO a withExtendedImage img action = withImage img $ \p (oldx,oldy) c -> do@@ -231,6 +247,7 @@       (oldx*c)                     -- number of bytes        action q (newx,newy) c+-}      --------------------------------------------------------------------------------   
vacuum-opengl.cabal view
@@ -1,7 +1,7 @@ Name:                vacuum-opengl-Version:             0.0.1+Version:             0.0.2 Synopsis:            Visualize live Haskell data structures using vacuum, graphviz and OpenGL.-Description:         Visualize live Haskell data structures using vacuum, graphviz and OpenGL.+Description:         Visualize live Haskell data structures using vacuum, graphviz and OpenGL.                      Intended as an easier-to-build alternative (no large dependency chain)                      to vacuum-cairo. Because of severe problems with GHCi+GLUT, it is                       implemented using a client-server architecture.@@ -27,7 +27,9 @@     Build-Depends:        base >= 3 && < 4, directory, process, network     cpp-options:          -DBASE_MAJOR_VERSION=3 -  Build-Depends:       stb-image >= 0.1.3, OpenGL >= 2.2, GLUT >= 2.1+  Build-Depends:       stb-image >= 0.2 && < 0.3,+                       bitmap < 0.1, bitmap-opengl < 0.1,+                       OpenGL >= 2.2, GLUT >= 2.1        Main-is:             ServerMain.hs   Other-Modules:       System.Vacuum.OpenGL.Server