vacuum-opengl 0.0.2 → 0.0.3
raw patch · 3 files changed
+25/−9 lines, 3 filesdep +filepathdep ~bitmapdep ~bitmap-openglPVP ok
version bump matches the API change (PVP)
Dependencies added: filepath
Dependency ranges changed: bitmap, bitmap-opengl
API changes (from Hackage documentation)
Files
System/Vacuum/OpenGL/Client.hs view
@@ -5,7 +5,7 @@ -- Usage example: -- -- > $ vacuum-opengl-server &--- > vaacum-opengl server started - press ESC to exit. +-- > vacuum-opengl server started - press ESC to exit. -- > listening on port 55961 -- > -- > $ ghci@@ -24,6 +24,12 @@ -- * the image generated by graphviz may be bigger than the maximum texture -- size your video card supports (eg. 2048). In this case you will see -- a white rectangle. TODO: handle this better.+--+-- TODO:+-- +-- * zooming & panning with mouse+--+-- * nicer graph labels -- module System.Vacuum.OpenGL.Client
System/Vacuum/OpenGL/Server.hs view
@@ -1,7 +1,7 @@ -- | The vacuum-opengl server. This compiles to the executable -- \"vacuum-opengl-server\", which you need to start to be able--- to use the +-- to use the client library. -- module System.Vacuum.OpenGL.Server where@@ -27,6 +27,7 @@ import System.Directory import System.Environment import System.Exit+import System.FilePath import System.IO import System.IO.Unsafe@@ -34,6 +35,7 @@ import Network import Foreign+import Foreign.C -------------------------------------------------------------------------------- @@ -50,6 +52,11 @@ -------------------------------------------------------------------------------- +gl_max_texture_size :: CInt +gl_max_texture_size = 0xd33 -- OpenGL does not export this...++--------------------------------------------------------------------------------+ showPort :: PortID -> String showPort p = case p of PortNumber n -> show n@@ -100,8 +107,8 @@ convertToPNG :: String -> IO Image convertToPNG input = do tmp <- getTemporaryDirectory- let dot = tmp ++ "vacuum-opengl-temp.dot"- png = tmp ++ "vacuum-opengl-temp.png"+ let dot = tmp </> "vacuum-opengl-temp.dot"+ png = tmp </> "vacuum-opengl-temp.png" writeFile dot input -- print dot@@ -167,7 +174,9 @@ -} eimg <- if b then return img else extendImage img- tex <- makeSimpleBitmapTexture eimg+ simg <- return eimg -- will be a "scaled image" when i write it + + tex <- makeSimpleBitmapTexture simg putMVar theTexture $ Just (tex, bitmapSize img)
vacuum-opengl.cabal view
@@ -1,5 +1,5 @@ Name: vacuum-opengl-Version: 0.0.2+Version: 0.0.3 Synopsis: 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)@@ -21,14 +21,15 @@ Executable vacuum-opengl-server if flag(base4)- Build-Depends: base >= 4 && < 5, directory, process, network+ Build-Depends: base >= 4 && < 5, directory, process, network, filepath cpp-options: -DBASE_MAJOR_VERSION=4 else- Build-Depends: base >= 3 && < 4, directory, process, network+ Build-Depends: base >= 3 && < 4, directory, process, network, filepath cpp-options: -DBASE_MAJOR_VERSION=3 Build-Depends: stb-image >= 0.2 && < 0.3,- bitmap < 0.1, bitmap-opengl < 0.1,+ bitmap >= 0.0.1 && < 0.1, + bitmap-opengl >= 0.0.0 && < 0.1, OpenGL >= 2.2, GLUT >= 2.1 Main-is: ServerMain.hs