GLGETSEPARABLEFILTER(3G)

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

✨ GLGETSEPARABLEFILTER ✨

okay bestie so this is a page from manual section 3G, and it's all about glGetSeparableFilter πŸ’– β€” the little guy that goes and fetches your separable convolution filter kernel images. yes it's giving very niche OpenGL core. no cap, it's iconic.


πŸŽ€ C SPECIFICATION πŸŽ€

void glGetSeparableFilter( GLenum target,
                           GLenum format,
                           GLenum type,
                           GLvoid *row,
                           GLvoid *column,
                           GLvoid *span )

🌸 PARAMETERS 🌸

  • target β€” the separable filter you're tryna get back. gotta be GL_SEPARABLE_2D. that's the only vibe allowed here.
  • format β€” the format of your output images. 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. pick one, bestie, or the whole thing falls apart 😭
  • type β€” the data type of the components in your output images. these symbolic constants are all accepted:
    • 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
    • GL_UNSIGNED_INT_2_10_10_10_REV
  • row β€” pointer to storage for the row filter image. it goes here. 🫢
  • column β€” pointer to storage for the column filter image. it goes there.
  • span β€” pointer to storage for the span filter image. and here's the tea: it's currently unused. yeah. girl's just standing there. πŸ’€

πŸ¦‹ DESCRIPTION πŸ¦‹

so glGetSeparableFilter hands you back the two one-dimensional filter kernel images for whatever the current separable 2D convolution filter is. the row image gets placed in row and the column image gets placed in column, all according to whatever you specified in format and type. ✨

and span? bestie. in the current implementation, span is not affected in any way. literally untouched. leave her alone.

also important: no pixel transfer operations are performed on the images, but the relevant pixel storage modes do get applied. so like, storage modes yes, pixel transfer no. the way that works is so specific of them honestly.

color components that are present in format but not included in the internal format of the filters come back as zero. and here's the mapping of internal color components onto the components of format:

  • Internal Red β†’ resulting component Red
  • Internal Green β†’ resulting component Green
  • Internal Blue β†’ resulting component Blue
  • Internal Alpha β†’ resulting component Alpha
  • Internal Luminance β†’ resulting component Red
  • Internal Intensity β†’ resulting component Red

πŸ‘‘ NOTES πŸ‘‘

glGetSeparableFilter is only present if GL_ARB_imaging shows up when you call glGetString with an argument of GL_EXTENSIONS. so like, check first. do your little vibe check. 🌈

and non-separable 2D filters? those are NOT invited here. they must be retrieved with glGetConvolutionFilter. periodt.


πŸ’… ERRORS πŸ’…

buckle up bestie, this section is a whole mood board of ways to mess up.
  • GL_INVALID_ENUM is generated if target is not GL_SEPARABLE_2D.
  • 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 glGetSeparableFilter is executed between the execution of glBegin and the corresponding execution of glEnd. (do not do this. i am begging. πŸ™ˆ)
  • 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 πŸ”₯

  • glGetConvolutionFilter(3G)
  • glConvolutionParameter(3G)
  • glSeparableFilter2D(3G)

and that's the whole page, bestie πŸ“πŸ§š the little footer down there just says GLGETSEPARABLEFILTER(3G) β€” same name, no date, no version, just the name vibing at the bottom like a signature. slay. πŸ’œβœ¨

πŸ“¦ where this page comes from