-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | Draw and update graphs in real time with OpenGL
--
@package dynamic-graph
@version 0.1.0.0
module Graphics.DynamicGraph.Util
-- | Utility function to setup GLFW for graph drawing
setupGLFW :: EitherT String IO ()
-- | Draw and update line graphs with OpenGL.
--
-- Based on:
-- https://en.wikibooks.org/wiki/OpenGL_Programming/Scientific_OpenGL_Tutorial_01
--
-- You probably want to use Graphics.DynamicGraph.TextureLine as
-- it is better.
module Graphics.DynamicGraph.SimpleLine
-- | (graph windowWidth windowHeight bufLen) creates a window of
-- width windowWidth and height windowHeight for
-- displaying a line graph. A function is returned for updating the line
-- graph. It takes a pointer to a c array of length bufLen
-- consisting of pairs of <x, y> coordinates for updating the graph
-- as this is the format that OpenGL requires.
graph :: Int -> Int -> Int -> EitherT String IO (Ptr GLfloat -> IO ())
-- | Draw and update line graphs with OpenGL.
--
-- Based on:
-- https://en.wikibooks.org/wiki/OpenGL_Programming/Scientific_OpenGL_Tutorial_02
module Graphics.DynamicGraph.TextureLine
-- | (graph windowWidth windowHeight samples xResolution) creates
-- a window of width windowWidth and height
-- windowHeight for displaying a line graph. A function is
-- returned for updating the line graph. It takes an instance of
-- IsPixelData of length samples as the y values and draws a
-- line graph with xResolution vertices.
graph :: IsPixelData a => Int -> Int -> Int -> Int -> EitherT String IO (a -> IO ())
-- | Same as above, but returns a Consumer instead of an update function
graphAsConsumer :: IsPixelData a => Int -> Int -> Int -> Int -> EitherT String IO (Consumer a IO ())
-- | Draw and update waterfall plots with OpenGL. Useful for spectrograms.
module Graphics.DynamicGraph.Waterfall
-- | The matlab / octave "jet" color map
jet :: [GLfloat]
-- | "jet" modified so that low values are a darker blue
jet_mod :: [GLfloat]
-- | The matlab / octave "hot" color map
hot :: [GLfloat]
-- | Ranges from black to white
bw :: [GLfloat]
-- | Ranges from white to black
wb :: [GLfloat]
-- | (graph windowWidth windowHeight width height colormap)
-- creates a window of width windowWidth and height
-- windowHeight for displaying a waterfall plot. A Consumer is
-- returned for updating the waterfall plot. Feeding an instance of
-- IsPixelData of length width shifts all rows of the waterfall
-- down and updates the top row with the data. The waterfall is
-- height rows high. colorMap is used to map values to
-- display color.
graph :: IsPixelData a => Int -> Int -> Int -> Int -> [GLfloat] -> EitherT String IO (Consumer a IO ())