1GLACCUM(3G)                      OpenGL Manual                     GLACCUM(3G)
2
3
4

NAME

6       glAccum - operate on the accumulation buffer
7

C SPECIFICATION

9       void glAccum(GLenum op, GLfloat value);
10

PARAMETERS

12       op
13           Specifies the accumulation buffer operation. Symbolic constants
14           GL_ACCUM, GL_LOAD, GL_ADD, GL_MULT, and GL_RETURN are accepted.
15
16       value
17           Specifies a floating-point value used in the accumulation buffer
18           operation.  op determines how value is used.
19

DESCRIPTION

21       The accumulation buffer is an extended-range color buffer. Images are
22       not rendered into it. Rather, images rendered into one of the color
23       buffers are added to the contents of the accumulation buffer after
24       rendering. Effects such as antialiasing (of points, lines, and
25       polygons), motion blur, and depth of field can be created by
26       accumulating images generated with different transformation matrices.
27
28       Each pixel in the accumulation buffer consists of red, green, blue, and
29       alpha values. The number of bits per component in the accumulation
30       buffer depends on the implementation. You can examine this number by
31       calling glGetIntegerv() four times, with arguments GL_ACCUM_RED_BITS,
32       GL_ACCUM_GREEN_BITS, GL_ACCUM_BLUE_BITS, and GL_ACCUM_ALPHA_BITS.
33       Regardless of the number of bits per component, the range of values
34       stored by each component is -1 1. The accumulation buffer pixels are
35       mapped one-to-one with frame buffer pixels.
36
37       glAccum operates on the accumulation buffer. The first argument, op, is
38       a symbolic constant that selects an accumulation buffer operation. The
39       second argument, value, is a floating-point value to be used in that
40       operation. Five operations are specified: GL_ACCUM, GL_LOAD, GL_ADD,
41       GL_MULT, and GL_RETURN.
42
43       All accumulation buffer operations are limited to the area of the
44       current scissor box and applied identically to the red, green, blue,
45       and alpha components of each pixel. If a glAccum operation results in a
46       value outside the range -1 1, the contents of an accumulation buffer
47       pixel component are undefined.
48
49       The operations are as follows:
50
51       GL_ACCUM
52           Obtains R, G, B, and A values from the buffer currently selected
53           for reading (see glReadBuffer()). Each component value is divided
54           by 2 n - 1, where n is the number of bits allocated to each color
55           component in the currently selected buffer. The result is a
56           floating-point value in the range 0 1, which is multiplied by value
57           and added to the corresponding pixel component in the accumulation
58           buffer, thereby updating the accumulation buffer.
59
60       GL_LOAD
61           Similar to GL_ACCUM, except that the current value in the
62           accumulation buffer is not used in the calculation of the new
63           value. That is, the R, G, B, and A values from the currently
64           selected buffer are divided by 2 n - 1, multiplied by value, and
65           then stored in the corresponding accumulation buffer cell,
66           overwriting the current value.
67
68       GL_ADD
69           Adds value to each R, G, B, and A in the accumulation buffer.
70
71       GL_MULT
72           Multiplies each R, G, B, and A in the accumulation buffer by value
73           and returns the scaled component to its corresponding accumulation
74           buffer location.
75
76       GL_RETURN
77           Transfers accumulation buffer values to the color buffer or buffers
78           currently selected for writing. Each R, G, B, and A component is
79           multiplied by value, then multiplied by 2 n - 1, clamped to the
80           range 0 2 n - 1, and stored in the corresponding display buffer
81           cell. The only fragment operations that are applied to this
82           transfer are pixel ownership, scissor, dithering, and color
83           writemasks.
84
85       To clear the accumulation buffer, call glClearAccum() with R, G, B, and
86       A values to set it to, then call glClear() with the accumulation buffer
87       enabled.
88

NOTES

90       Only pixels within the current scissor box are updated by a glAccum
91       operation.
92

ERRORS

94       GL_INVALID_ENUM is generated if op is not an accepted value.
95
96       GL_INVALID_OPERATION is generated if there is no accumulation buffer.
97
98       GL_INVALID_OPERATION is generated if glAccum is executed between the
99       execution of glBegin() and the corresponding execution of glEnd().
100

ASSOCIATED GETS

102       glGet() with argument GL_ACCUM_RED_BITS
103
104       glGet() with argument GL_ACCUM_GREEN_BITS
105
106       glGet() with argument GL_ACCUM_BLUE_BITS
107
108       glGet() with argument GL_ACCUM_ALPHA_BITS
109

SEE ALSO

111       glClear(), glClearAccum(), glCopyPixels(), glDrawBuffer(), glGet(),
112       glReadBuffer(), glReadPixels(), glScissor(), glStencilOp()
113
115       Copyright © 1991-2006 Silicon Graphics, Inc. This document is licensed
116       under the SGI Free Software B License. For details, see
117       http://oss.sgi.com/projects/FreeB/.
118

AUTHORS

120       opengl.org
121
122
123
124opengl.org                        07/13/2018                       GLACCUM(3G)
Impressum