accum

accum :: AccumOp -> GLfloat -> IO ()
OpenGL Graphics.Rendering.OpenGL.GL.Framebuffer
The accumulation buffer is an extended-range color buffer. Images are not rendered into it. Rather, images rendered into one of the color buffers are added to the contents of the accumulation buffer after rendering. Effects such as antialiasing (of points, lines, and polygons), motion blur, and depth of field can be created by accumulating images generated with different transformation matrices. Each pixel in the accumulation buffer consists of red, green, blue, and alpha values. The number of bits per component in the accumulation buffer depends on the implementation (see accumBits). Regardless of the number of bits per component, the range of values stored by each component is [-1, 1]. The accumulation buffer pixels are mapped one-to-one with frame buffer pixels. accum operates on the accumulation buffer. The first argument selects an accumulation buffer operation. The second argument, is a floating-point value to be used in that operation, see AccumOp. All accumulation buffer operations are limited to the area of the current scissor box and applied identically to the red, green, blue, and alpha components of each pixel. If an accum operation results in a value outside the range [-1, 1], the contents of an accumulation buffer pixel component are undefined. To clear the accumulation buffer, use clearAccum to specify the clear value, then call clear with the accumulation buffer enabled.
accum :: (IArray a e, Ix i) => (e -> e' -> e) -> a i e -> [(i, e')] -> a i e
array Data.Array.IArray
accum f takes an array and an association list and accumulates pairs from the list into the array with the accumulating function f. Thus accumArray can be defined using accum: > accumArray f z b = accum f (array b [(i, z) | i \<- range b])
accum :: Ix i => (e -> a -> e) -> Array i e -> [(i, a)] -> Array i e
array Data.Array
accum f takes an array and an association list and accumulates pairs from the list into the array with the accumulating function f. Thus accumArray can be defined using accum: > accumArray f z b = accum f (array b [(i, z) | i <- range b])
accumArray :: (IArray a e, Ix i) => (e -> e' -> e) -> e -> (i, i) -> [(i, e')] -> a i e
array Data.Array.IArray
Constructs an immutable array from a list of associations. Unlike array, the same index is allowed to occur multiple times in the list of associations; an accumulating function is used to combine the values of elements with the same index. For example, given a list of values of some index type, hist produces a histogram of the number of occurrences of each index within a specified range: > hist :: (Ix a, Num b) => (a,a) -> [a] -> Array a b > hist bnds is = accumArray (+) 0 bnds [(i, 1) | i\<-is, inRange bnds i]
accumArray :: Ix i => (e -> a -> e) -> e -> (i, i) -> [(i, a)] -> Array i e
array Data.Array
The accumArray function deals with repeated indices in the association list using an accumulating function which combines the values of associations with the same index. For example, given a list of values of some index type, hist produces a histogram of the number of occurrences of each index within a specified range: > hist :: (Ix a, Num b) => (a,a) -> [a] -> Array a b > hist bnds is = accumArray (+) 0 bnds [(i, 1) | i<-is, inRange bnds i] If the accumulating function is strict, then accumArray is strict in the values, as well as the indices, in the association list. Thus, unlike ordinary arrays built with array, accumulated arrays should not in general be recursive.
accumBits :: GettableStateVar (Color4 GLsizei)
OpenGL Graphics.Rendering.OpenGL.GL.Framebuffer
accumBufferDepths :: GettableStateVar (BufferDepth, BufferDepth, BufferDepth, BufferDepth)
GLUT Graphics.UI.GLUT.State
Contains the number of red, green, blue, and alpha bits in the accumulation buffer of the current window\'s current layer (0 in color index mode).
accumFM :: Ord a => FiniteMap a b -> a -> (b -> b -> b) -> b -> FiniteMap a b
fgl Data.Graph.Inductive.Internal.FiniteMap
defines or aggregates entries
Accum :: AccumOp
OpenGL Graphics.Rendering.OpenGL.GL.Framebuffer
Obtains R, G, B, and A values from the buffer currently selected for reading (see readBuffer). Each component value is divided by 2^n-1, number of bits allocated to each color component in the currently selected buffer. The result is a floating-point value in the range [0, 1], which is multiplied by the value given to accum and added to the corresponding pixel component in the accumulation buffer, thereby updating the accumulation buffer.
AccumBuffer :: ClearBuffer
OpenGL Graphics.Rendering.OpenGL.GL.Framebuffer
The accumulation buffer.
AccumBufferAttributes :: ServerAttributeGroup
OpenGL Graphics.Rendering.OpenGL.GL.SavingState
data AccumOp
OpenGL Graphics.Rendering.OpenGL.GL.Framebuffer
An operation on the accumulation buffer.
mapAccumL :: (acc -> x -> (acc, y)) -> acc -> [x] -> (acc, [y])
base Data.List
The mapAccumL function behaves like a combination of map and foldl; it applies a function to each element of a list, passing an accumulating parameter from left to right, and returning a final value of this accumulator together with the new list.
mapAccumL :: Traversable t => (a -> b -> (a, c)) -> a -> t b -> (a, t c)
base Data.Traversable
The mapAccumL function behaves like a combination of fmap and foldl; it applies a function to each element of a structure, passing an accumulating parameter from left to right, and returning a final value of this accumulator together with the new structure.
mapAccumR :: (acc -> x -> (acc, y)) -> acc -> [x] -> (acc, [y])
base Data.List
The mapAccumR function behaves like a combination of map and foldr; it applies a function to each element of a list, passing an accumulating parameter from right to left, and returning a final value of this accumulator together with the new list.
mapAccumR :: Traversable t => (a -> b -> (a, c)) -> a -> t b -> (a, t c)
base Data.Traversable
The mapAccumR function behaves like a combination of fmap and foldr; it applies a function to each element of a structure, passing an accumulating parameter from right to left, and returning a final value of this accumulator together with the new structure.
clearAccum :: StateVar (Color4 GLfloat)
OpenGL Graphics.Rendering.OpenGL.GL.Framebuffer
Controls the red, green, blue, and alpha values used by clear to clear the accumulation buffer. Values written into clearAccum are clamped to the range [-1, 1]. The initial values are all 0.
gfoldlAccum :: Data d => (forall e r. Data e => a -> c (e -> r) -> e -> (a, c r)) -> (forall g. a -> g -> (a, c g)) -> a -> d -> (a, c d)
syb Data.Generics.Twins
gfoldl with accumulation
gmapAccumA :: (Data d, Applicative a) => (forall e. Data e => b -> e -> (b, a e)) -> b -> d -> (b, a d)
syb Data.Generics.Twins
Applicative version
gmapAccumM :: (Data d, Monad m) => (forall e. Data e => a -> e -> (a, m e)) -> a -> d -> (a, m d)
syb Data.Generics.Twins
gmapM with accumulation

Show more results