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

NAME

6       glGetHistogram - get histogram table
7

C SPECIFICATION

9       void glGetHistogram(GLenum target, GLboolean reset, GLenum format,
10                           GLenum type, GLvoid * values);
11

PARAMETERS

13       target
14           Must be GL_HISTOGRAM.
15
16       reset
17           If GL_TRUE, each component counter that is actually returned is
18           reset to zero. (Other counters are unaffected.) If GL_FALSE, none
19           of the counters in the histogram table is modified.
20
21       format
22           The format of values to be returned in values. Must be one of
23           GL_RED, GL_GREEN, GL_BLUE, GL_ALPHA, GL_RGB, GL_BGR, GL_RGBA,
24           GL_BGRA, GL_LUMINANCE, or GL_LUMINANCE_ALPHA.
25
26       type
27           The type of values to be returned in values. Symbolic constants
28           GL_UNSIGNED_BYTE, GL_BYTE, GL_BITMAP, GL_UNSIGNED_SHORT, GL_SHORT,
29           GL_UNSIGNED_INT, GL_INT, GL_FLOAT, GL_UNSIGNED_BYTE_3_3_2,
30           GL_UNSIGNED_BYTE_2_3_3_REV, GL_UNSIGNED_SHORT_5_6_5,
31           GL_UNSIGNED_SHORT_5_6_5_REV, GL_UNSIGNED_SHORT_4_4_4_4,
32           GL_UNSIGNED_SHORT_4_4_4_4_REV, GL_UNSIGNED_SHORT_5_5_5_1,
33           GL_UNSIGNED_SHORT_1_5_5_5_REV, GL_UNSIGNED_INT_8_8_8_8,
34           GL_UNSIGNED_INT_8_8_8_8_REV, GL_UNSIGNED_INT_10_10_10_2, and
35           GL_UNSIGNED_INT_2_10_10_10_REV are accepted.
36
37       values
38           A pointer to storage for the returned histogram table.
39

DESCRIPTION

41       glGetHistogram returns the current histogram table as a one-dimensional
42       image with the same width as the histogram. No pixel transfer
43       operations are performed on this image, but pixel storage modes that
44       are applicable to 1D images are honored.
45
46       If a non-zero named buffer object is bound to the GL_PIXEL_PACK_BUFFER
47       target (see glBindBuffer()) while a histogram table is requested,
48       values is treated as a byte offset into the buffer object's data store.
49
50       Color components that are requested in the specified format, but which
51       are not included in the internal format of the histogram, are returned
52       as zero. The assignments of internal color components to the components
53       requested by format are:
54
55       ┌─────────────────────────────────┬───────────────────────────────────┐
56       │                                 │                                   │
57Internal Resulting 
58Component                        Component                         
59       │                                 │                                   │
60       ├─────────────────────────────────┼───────────────────────────────────┤
61       │Red                              │ Red                               │
62       ├─────────────────────────────────┼───────────────────────────────────┤
63       │Green                            │ Green                             │
64       ├─────────────────────────────────┼───────────────────────────────────┤
65       │Blue                             │ Blue                              │
66       ├─────────────────────────────────┼───────────────────────────────────┤
67       │Alpha                            │ Alpha                             │
68       ├─────────────────────────────────┼───────────────────────────────────┤
69       │Luminance                        │ Red                               │
70       └─────────────────────────────────┴───────────────────────────────────┘
71

NOTES

73       glGetHistogram is present only if ARB_imaging is returned when
74       glGetString() is called with an argument of GL_EXTENSIONS.
75

ERRORS

77       GL_INVALID_ENUM is generated if target is not GL_HISTOGRAM.
78
79       GL_INVALID_ENUM is generated if format is not one of the allowable
80       values.
81
82       GL_INVALID_ENUM is generated if type is not one of the allowable
83       values.
84
85       GL_INVALID_OPERATION is generated if type is one of
86       GL_UNSIGNED_BYTE_3_3_2, GL_UNSIGNED_BYTE_2_3_3_REV,
87       GL_UNSIGNED_SHORT_5_6_5, or GL_UNSIGNED_SHORT_5_6_5_REV and format is
88       not GL_RGB.
89
90       GL_INVALID_OPERATION is generated if type is one of
91       GL_UNSIGNED_SHORT_4_4_4_4, GL_UNSIGNED_SHORT_4_4_4_4_REV,
92       GL_UNSIGNED_SHORT_5_5_5_1, GL_UNSIGNED_SHORT_1_5_5_5_REV,
93       GL_UNSIGNED_INT_8_8_8_8, GL_UNSIGNED_INT_8_8_8_8_REV,
94       GL_UNSIGNED_INT_10_10_10_2, or GL_UNSIGNED_INT_2_10_10_10_REV and
95       format is neither GL_RGBA nor GL_BGRA.
96
97       GL_INVALID_OPERATION is generated if a non-zero buffer object name is
98       bound to the GL_PIXEL_PACK_BUFFER target and the buffer object's data
99       store is currently mapped.
100
101       GL_INVALID_OPERATION is generated if a non-zero buffer object name is
102       bound to the GL_PIXEL_PACK_BUFFER target and the data would be packed
103       to the buffer object such that the memory writes required would exceed
104       the data store size.
105
106       GL_INVALID_OPERATION is generated if a non-zero buffer object name is
107       bound to the GL_PIXEL_PACK_BUFFER target and values is not evenly
108       divisible into the number of bytes needed to store in memory a datum
109       indicated by type.
110
111       GL_INVALID_OPERATION is generated if glGetHistogram is executed between
112       the execution of glBegin() and the corresponding execution of glEnd().
113

ASSOCIATED GETS

115       glGetHistogramParameter()
116
117       glGet() with argument GL_PIXEL_PACK_BUFFER_BINDING
118

SEE ALSO

120       glHistogram(), glResetHistogram(),
121
123       Copyright © 1991-2006 Silicon Graphics, Inc. This document is licensed
124       under the SGI Free Software B License. For details, see
125       http://oss.sgi.com/projects/FreeB/.
126

AUTHORS

128       opengl.org
129
130
131
132opengl.org                        06/10/2014                GLGETHISTOGRAM(3G)
Impressum