dynamic-graph-0.1.0.1: Draw and update graphs in real time with OpenGL

Safe HaskellNone
LanguageHaskell2010

Graphics.DynamicGraph.SimpleLine

Description

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.

Synopsis

Documentation

graph :: Int -> Int -> Int -> EitherT String IO (Ptr GLfloat -> IO ()) Source

(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.