GLGETCONVOLUTIONFILTER(3G)

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

✨ GLGETCONVOLUTIONFILTER ✨

okay bestie, we're doing glGetConvolutionFilter from the 3G manual family β€” OpenGL imaging hours, no cap πŸ’…


πŸŽ€ C SPECIFICATION πŸŽ€

void glGetConvolutionFilter( GLenum target,
                             GLenum format,
                             GLenum type,
                             GLvoid *image )

🌸 PARAMETERS 🌸

  • target β€” which filter you wanna pull out, queen. Gotta be one of GL_CONVOLUTION_1D or GL_CONVOLUTION_2D.
  • format β€” the format of the output image. Must be one of GL_RED, GL_GREEN, GL_BLUE, GL_ALPHA, GL_RGB, GL_BGR, GL_RGBA, GL_BGRA, GL_LUMINANCE, or GL_LUMINANCE_ALPHA.
  • type β€” the data type of the components in your output image. The symbolic constants it accepts are GL_UNSIGNED_BYTE, GL_BYTE, GL_BITMAP, GL_UNSIGNED_SHORT, GL_SHORT, GL_UNSIGNED_INT, GL_INT, GL_FLOAT, GL_UNSIGNED_BYTE_3_3_2, GL_UNSIGNED_BYTE_2_3_3_REV, GL_UNSIGNED_SHORT_5_6_5, GL_UNSIGNED_SHORT_5_6_5_REV, GL_UNSIGNED_SHORT_4_4_4_4, GL_UNSIGNED_SHORT_4_4_4_4_REV, GL_UNSIGNED_SHORT_5_5_5_1, GL_UNSIGNED_SHORT_1_5_5_5_REV, GL_UNSIGNED_INT_8_8_8_8, GL_UNSIGNED_INT_8_8_8_8_REV, GL_UNSIGNED_INT_10_10_10_2, and GL_UNSIGNED_INT_2_10_10_10_REV.
  • image β€” a pointer to storage where the output image goes. Your lil landing zone 🫢

🌈 DESCRIPTION 🌈

So like, glGetConvolutionFilter returns the current 1D or 2D convolution filter kernel as an image. Iconic behavior honestly. That one- or two-dimensional image gets placed into image following whatever you specified in format and type. And here's the tea: no pixel transfer operations are performed on this image β€” but the relevant pixel storage modes do get applied. iykyk.

Color components that show up in format but aren't included in the internal of the filter come back as zero. The way the internal color components map onto the components of format is literally this:

─────────────────────────────────────────
Internal Component   Resulting Component
─────────────────────────────────────────
Red                  Red
Green                Green
Blue                 Blue
Alpha                Alpha
Luminance            Red
Intensity            Red
─────────────────────────────────────────

πŸ‘‘ NOTES πŸ‘‘

glGetConvolutionFilter is present only if GL_ARB_imaging is returned when glGetString is called with an argument of GL_EXTENSIONS. vibe check your extensions first, fr fr.

Also β€” the current separable 2D filter has to be retrieved with glGetSeparableFilter, not with glGetConvolutionFilter. Don't come for me, that's just how it is πŸ’€

πŸ’€ ERRORS πŸ’€

  • GL_INVALID_ENUM is generated if target is not one of the allowable values.
  • GL_INVALID_ENUM is generated if format is not one of the allowable values.
  • GL_INVALID_ENUM is generated if type is not one of the allowable values.
  • GL_INVALID_OPERATION is generated if glGetConvolutionFilter is executed between the execution of glBegin and the corresponding execution of glEnd. (not in the middle of a begin/end block bestie, that's the rule 😭)
  • GL_INVALID_OPERATION is generated if type is one of GL_UNSIGNED_BYTE_3_3_2, GL_UNSIGNED_BYTE_2_3_3_REV, GL_UNSIGNED_SHORT_5_6_5, or GL_UNSIGNED_SHORT_5_6_5_REV and format is not GL_RGB.
  • GL_INVALID_OPERATION is generated if type is one of GL_UNSIGNED_SHORT_4_4_4_4, GL_UNSIGNED_SHORT_4_4_4_4_REV, GL_UNSIGNED_SHORT_5_5_5_1, GL_UNSIGNED_SHORT_1_5_5_5_REV, GL_UNSIGNED_INT_8_8_8_8, GL_UNSIGNED_INT_8_8_8_8_REV, GL_UNSIGNED_INT_10_10_10_2, or GL_UNSIGNED_INT_2_10_10_10_REV and format is neither GL_RGBA nor GL_BGRA.

πŸ”₯ ASSOCIATED GETS πŸ”₯

  • glGetConvolutionParameter

πŸ¦‹ SEE ALSO πŸ¦‹

  • glGetSeparableFilter(3G)
  • glConvolutionParameter(3G)
  • glConvolutionFilter1D(3G)
  • glConvolutionFilter2D(3G)

and that's the whole page bestie, you ate πŸ’– this was the GLGETCONVOLUTIONFILTER(3G) page β€” source/version and date brought to you by the 3G crew, GLGETCONVOLUTIONFILTER(3G) on both ends, slay βœ¨πŸŽ€πŸŒˆ

πŸ“¦ where this page comes from