256 /* width (number of bins) */, GL_LUMINANCE /* internalformat */, GL_TRUE /* sink */);
glEnable(GL_HISTOGRAM_EXT)
For each component represented in the histogram internal format, let the corresponding component of the incoming pixel (luminance corresponds to red) be of value c (after clamping to [0, 1). The corresponding component of bin number floor((width-1)*c)
is incremented by 1.
void glGetHistogramEXT( GLenum target, GLboolean reset, GLenum format,
GLenum type, GLvoid *values )
internal component | resulting component |
red | red |
green | green |
blue | blue |
alpha | alpha |
luminance | red/luminance |