GLGETHISTOGRAMPARAMETER(3G)

πŸ“¦ version 24.3.3, in opensuse-leap 16.0

✨ GLGETHISTOGRAMPARAMETER ✨

okay bestie, welcome to GLGETHISTOGRAMPARAMETER(3G) πŸ’– this is the section 3G glow-up of your fave little query function β€” it's how you peek at histogram parameters without touching anything. no cap, it's giving "tell me everything but don't change a thing" πŸ‘‘


🌸 NAME 🌸

glGetHistogramParameterfv, glGetHistogramParameteriv β€” get histogram parameters πŸŽ€


πŸ¦‹ C SPECIFICATION πŸ¦‹

void glGetHistogramParameterfv( GLenum target,
                                GLenum pname,
                                GLfloat *params )
void glGetHistogramParameteriv( GLenum target,
                                GLenum pname,
                                GLint *params )

two flavors, same energy: one hands you GLfloats, the other hands you GLints. pick your fighter πŸ’…


πŸ’œ PARAMETERS πŸ’œ

  • target β€” has to be one of GL_HISTOGRAM or GL_PROXY_HISTOGRAM. those are the only two vibes allowed here.
  • pname β€” the name of the parameter you're trying to pull. must be one of GL_HISTOGRAM_WIDTH, GL_HISTOGRAM_FORMAT, GL_HISTOGRAM_RED_SIZE, GL_HISTOGRAM_GREEN_SIZE, GL_HISTOGRAM_BLUE_SIZE, GL_HISTOGRAM_ALPHA_SIZE, GL_HISTOGRAM_LUMINANCE_SIZE, or GL_HISTOGRAM_SINK. literally that whole list, no substitutions 🫢
  • params β€” a pointer to storage where the returned values go. you bring the bucket, it fills the bucket πŸ“

🌈 DESCRIPTION 🌈

so glGetHistogramParameter is the girl who asks the questions. she queries parameter values for the current histogram or for a proxy β€” that's it, that's the job. ✨

you call her with a target of either:

  • GL_HISTOGRAM β€” to obtain information for the current histogram table
  • GL_PROXY_HISTOGRAM β€” to obtain information from the most recent proxy request

…and then one of these values for the pname argument πŸ‘‡

  • GL_HISTOGRAM_WIDTH β€” Histogram table width
  • GL_HISTOGRAM_FORMAT β€” Internal
  • GL_HISTOGRAM_RED_SIZE β€” Red component counter size, in bits
  • GL_HISTOGRAM_GREEN_SIZE β€” Green component counter size, in bits
  • GL_HISTOGRAM_BLUE_SIZE β€” Blue component counter size, in bits
  • GL_HISTOGRAM_ALPHA_SIZE β€” Alpha component counter size, in bits
  • GL_HISTOGRAM_LUMINANCE_SIZE β€” Luminance component counter size, in bits
  • GL_HISTOGRAM_SINK β€” Value of the sink parameter

every single one of those, accounted for. the way that list just keeps going and every entry still matters πŸ˜­πŸ’–


πŸŽ€ NOTES πŸŽ€

glGetHistogramParameter is present only if GL_ARB_imaging is returned when glGetString is called with an argument of GL_EXTENSIONS. so like… check first, bestie. don't come crying to me if it's not there πŸ™ˆ

πŸ’€ ERRORS πŸ’€

  • GL_INVALID_ENUM is generated if target is not one of the allowable values. rude of you, honestly.
  • GL_INVALID_ENUM is generated if pname is not one of the allowable values. also rude.
  • GL_INVALID_OPERATION is generated if glGetHistogramParameter is executed between the execution of glBegin and the corresponding execution of glEnd. do NOT do that. that's the forbidden window, the no-fly zone, the "not me doing a query inside a glBegin/glEnd block" moment 😭

πŸ‘‘ SEE ALSO πŸ‘‘

  • glGetHistogram(3G)
  • glHistogram(3G)

go read those too, they're iconic, iykyk 🌟


and that's the whole page, fr fr β€” this was GLGETHISTOGRAMPARAMETER(3G), the section 3G edition, brought to you by the fine folks who keep the man pages alive. slay, stay safe, and always check your target πŸ’…βœ¨πŸ¦‹πŸ’œ

πŸ“¦ where this page comes from