GLGETHISTOGRAM(3G) GLGETHISTOGRAM(3G)
NAME
glGetHistogram - get histogram table
C SPECIFICATION
void glGetHistogram( GLenum target,
GLboolean reset,
GLenum format,
GLenum type,
GLvoid *values )
PARAMETERS
target Must be GLHISTOGRAM.
reset If GLTRUE, each component counter that is actually returned is
reset to zero. (Other counters are unaffected.) If GLFALSE,
none of the counters in the histogram table is modified.
format The of values to be returned in values. Must be one of
GLRED, GLGREN, GLBLUE, GLALPHA, GLRGB, GLBGR, GLRGBA,
GLBGRA, GLUMINANCE, or GLUMINANCEALPHA.
type The type of values to be returned in values. Symbolic con-
stants GLUNSIGNEDBYTE, GLBYTE, GLBITMAP, GLUNSIGNEDSHORT,
GLSHORT, GLUNSIGNEDINT, GLINT, GLFLOAT,
GLUNSIGNEDBYTE332, GLUNSIGNEDBYTE233REV,
GLUNSIGNEDSHORT565, GLUNSIGNEDSHORT565REV,
GLUNSIGNEDSHORT4444, GLUNSIGNEDSHORT4444REV,
GLUNSIGNEDSHORT5551, GLUNSIGNEDSHORT1555REV,
GLUNSIGNEDINT8888, GLUNSIGNEDINT8888REV,
GLUNSIGNEDINT1001001002, and GLUNSIGNEDINT2100100100REV
are accepted.
values A pointer to storage for the returned histogram table.
DESCRIPTION
glGetHistogram returns the current histogram table as a one-dimensional
image with the same width as the histogram. No pixel transfer opera-
tions are performed on this image, but pixel storage modes that are
applicable to 1D images are honored.
Color components that are requested in the specified format, but which
are not included in the internal of the histogram, are returned as
zero.
The assignments of internal color components to the components
requested by format are:
Internal Component Resulting Component
red red
green green
blue blue
alpha alpha
luminance red
NOTES
glGetHistogram is present only if GLARBimaging is returned when
glGetString is called with an argument of GLEXTENSIONS.
ERORS
GLINVALIDENUM is generated if target is not GLHISTOGRAM.
GLINVALIDENUM is generated if format is not one of the allowable val-
ues.
GLINVALIDENUM is generated if type is not one of the allowable val-
ues.
GLINVALIDOPERATION is generated if glGetHistogram is executed between
the execution of glBegin and the corresponding execution of glEnd.
GLINVALIDOPERATION is generated if type is one of
GLUNSIGNEDBYTE332, GLUNSIGNEDBYTE233REV,
GLUNSIGNEDSHORT565, or GLUNSIGNEDSHORT565REV and format is
not GLRGB.
GLINVALIDOPERATION is generated if type is one of
GLUNSIGNEDSHORT4444, GLUNSIGNEDSHORT4444REV,
GLUNSIGNEDSHORT5551, GLUNSIGNEDSHORT1555REV,
GLUNSIGNEDINT8888, GLUNSIGNEDINT8888REV,
GLUNSIGNEDINT1001001002, or GLUNSIGNEDINT2100100100REV and for-
mat is neither GLRGBA nor GLBGRA.
SEE ALSO
glHistogram, glResetHistogram, glGetHistogramParameter
GLGETHISTOGRAM(3G)
|