Next | Prev | Up | Top | Contents | Index

Using the Minmax Part of the Histogram Extension

The minmax part of the histogram extension lets you find out about minimum and maximum color component values present in an image. Using the minmax part of the histogram extension is similar to using the histogram part.

To determine minimum and maximum color values used in an image, follow these steps:

  1. Specify a minmax table by calling glMinmaxEXT().

    void glMinmaxEXT( GLenum target, GLenum internalformat, GLboolean sink)

  2. Enable minmax by calling

    glEnable(GL_MINMAX_EXT)

  3. Perform the pixel operations, for example, glCopyPixels().

    Each component of the internal format of the minmax table is compared to the corresponding component of the incoming RGBA pixel (luminance components are compared to red).

  4. Query the current context of the minmax table by calling glGetMinMaxExt():

    void glGetMinMaxEXT ( GLenum target, GLboolean reset, GLenum format,

    GLenum type, glvoid *values)

You can also call glGetMinmaxParameterEXT() to retrieve minmax state information; setting target to GL_MINMAX_EXT and pname to one of the following values:

GL_MINMAX_FORMAT_EXT

internal format of minmax table

GL_MINMAX_SINK_EXT

value of sink parameter

Next | Prev | Up | Top | Contents | Index