GLGETCONVOLUTIONPARAMETER(3G)

πŸ“¦ version 1.1, in centos-stream 9, fedora 43, fedora 44

πŸ’– GLGETCONVOLUTIONPARAMETER πŸ’–

okay so bestie, this is the glGetConvolutionParameterfv / glGetConvolutionParameteriv page from the 3G manual β€” it's the one where you peek at your convolution filter's settings instead of setting them. asking, not telling. we love a curious queen πŸŽ€


✨ C SPECIFICATION ✨

void glGetConvolutionParameterfv( GLenum target,
                                  GLenum pname,
                                  GLfloat *params )
void glGetConvolutionParameteriv( GLenum target,
                                  GLenum pname,
                                  GLint *params )

two flavors, same energy: fv hands you floats, iv hands you ints. pick your fighter πŸ’…


🌸 PARAMETERS 🌸

  • target β€” the filter whose parameters you're tryna retrieve. has to be one of GL_CONVOLUTION_1D, GL_CONVOLUTION_2D, or GL_SEPARABLE_2D. (three options, no in-between πŸ¦‹)
  • pname β€” which parameter you're asking about. must be one of GL_CONVOLUTION_BORDER_MODE, GL_CONVOLUTION_BORDER_COLOR, GL_CONVOLUTION_FILTER_SCALE, GL_CONVOLUTION_FILTER_BIAS, GL_CONVOLUTION_FORMAT, GL_CONVOLUTION_WIDTH, GL_CONVOLUTION_HEIGHT, GL_MAX_CONVOLUTION_WIDTH, or GL_MAX_CONVOLUTION_HEIGHT.
  • params β€” pointer to storage where the retrieved parameters get dropped off. it's giving "leave it at the front desk" πŸ“¦

πŸ‘‘ DESCRIPTION πŸ‘‘

glGetConvolutionParameter retrieves convolution parameters. target decides which convolution filter gets interrogated. pname decides which parameter comes back out. here's the menu, bestie:

  • GL_CONVOLUTION_BORDER_MODE β€” the convolution border mode. for the full list of border modes, go check glConvolutionParameter. iykyk πŸ’œ
  • GL_CONVOLUTION_BORDER_COLOR β€” the current convolution border color. params must be a pointer to an array of four elements, which will receive the red, green, blue, and alpha border colors. four. not three. not five. four 🌈
  • GL_CONVOLUTION_FILTER_SCALE β€” the current filter scale factors. params must be a pointer to an array of four elements, receiving the red, green, blue, and alpha filter scale factors, in that order. order matters, don't come for me ✨
  • GL_CONVOLUTION_FILTER_BIAS β€” the current filter bias factors. params must be a pointer to an array of four elements, receiving the red, green, blue, and alpha filter bias terms, in that order. again: in that order 🫢
  • GL_CONVOLUTION_FORMAT β€” the current internal .
okay yes, that sentence literally just ends there πŸ’€ that's how it is on the original page, so that's how it is here. go peep glConvolutionFilter1D, glConvolutionFilter2D, and glSeparableFilter2D for lists of allowable formats.
  • GL_CONVOLUTION_WIDTH β€” the current filter image width. πŸ“
  • GL_CONVOLUTION_HEIGHT β€” the current filter image height. πŸ“
  • GL_MAX_CONVOLUTION_WIDTH β€” the maximum acceptable filter image width. (the ceiling, the limit, the "that's enough" ⭐)
  • GL_MAX_CONVOLUTION_HEIGHT β€” the maximum acceptable filter image height. (same but vertical, slay)

πŸ’€ ERRORS πŸ’€

these are the vibes-ruiners. read them. memorize them. thank me later.
  • GL_INVALID_ENUM is generated if target is not one of the allowable values. 🚫
  • GL_INVALID_ENUM is generated if pname is not one of the allowable values. 🚫
  • GL_INVALID_ENUM is generated if target is GL_CONVOLUTION_1D and pname is GL_CONVOLUTION_HEIGHT or GL_MAX_CONVOLUTION_HEIGHT. 🚫
bestie listen: a 1D filter has no height. asking for its height is not a slay, it's an error. periodt.
  • GL_INVALID_OPERATION is generated if glGetConvolutionParameter is executed between the execution of glBegin and the corresponding execution of glEnd. 😭
so basically don't do that inside a glBegin/glEnd block. that's the forbidden window. respect it.

πŸ¦‹ SEE ALSO πŸ¦‹

  • glGetConvolutionFilter(3G)
  • glGetSeparableFilter2D(3G)
  • glConvolutionParameter(3G)

go read those too, they're the rest of the lore πŸ“š


and that's the whole page, bestie! this was GLGETCONVOLUTIONPARAMETER(3G) β€” part of the 3G manual set, dated back in the day and stamped with that same source/version energy at the bottom of the original. now go forth and query your convolution parameters with main character energy πŸ‘‘βœ¨

πŸ“¦ where this page comes from