GLDELETESAMPLERS(3G)

🌸 NAME 🌸

okay so this is glDeleteSamplers from the 3G manual section β€” the one that deletes named sampler objects, and honestly? It's giving cleanup-era main character energy πŸ’…βœ¨


✨ C SPECIFICATION ✨

bestie, here's the exact signature, don't touch it:

void glDeleteSamplers(GLsizei n, const GLuint * samplers);

πŸŽ€ PARAMETERS πŸŽ€

  • n β€” the number of sampler objects you're yeeting out of existence. like, how many.
  • samplers β€” an array of the sampler objects getting deleted. the whole squad.

πŸ’– DESCRIPTION πŸ’–

So glDeleteSamplers deletes n sampler objects named by the elements of the array samplers. That's it, that's the job 🫢

After a sampler object is deleted, its name is again unused β€” so it goes back into the name pool, fresh start, rebrand era 🌈

If a sampler object that is currently bound to a sampler unit gets deleted, it's as though glBindSampler() is called with unit set to the unit the sampler is bound to and sampler zero. so like, the unit auto-unbinds itself, no drama πŸ’€

Unused names in samplers are silently ignored, as is the reserved name zero. no error, no callout, they just get skipped. we love a chill function πŸ™ˆ


πŸ‘‘ NOTES πŸ‘‘

glDeleteSamplers is available only if the GL version is 3.3 or higher. periodt.


πŸ’€ ERRORS πŸ’€

  • GL_INVALID_VALUE is generated if n is negative. so like, don't do that 😭

πŸ”₯ ASSOCIATED GETS πŸ”₯

  • glIsSampler()

πŸ¦‹ VERSION SUPPORT πŸ¦‹

Okay so the chart in the original is this whole grid, and I'm not doing a table here, so let me just spill the tea plainly. The function/feature name in the row is glDeleteSamplers, and across the OpenGL versions it looks like this:

  • 2.0 β€” -
  • 2.1 β€” -
  • 3.0 β€” -
  • 3.1 β€” -
  • 3.2 β€” βœ”
  • 3.3 β€” βœ”
  • 4.0 β€” βœ”
  • 4.1 β€” βœ”
  • 4.2 β€” βœ”
  • 4.3 β€” βœ”
  • 4.4 β€” βœ”
  • 4.5 β€” βœ”

(the column headers in the original are literally just "OpenGL Version" and then each version number, and the row label is the function / feature name. iykyk ✨)


🌺 SEE ALSO 🌺

  • glGenSamplers()
  • glBindSampler()
  • glDeleteSamplers()
  • glIsSampler()

(yes, glDeleteSamplers() is listed in its own SEE ALSO. iconic self-reference behavior, we keep it exactly as-is πŸ’…)


Copyright Β© 2010-2014 Khronos Group. This material may be distributed subject to the terms and conditions set forth in the Open Publication License, v 1.0, 8 June 1999. http://opencontent.org/openpub/.


Copyright Β© 2010-2014 Khronos Group


and that's the whole page bestie 🫢 mwah πŸ’– β€” this little love letter came from [FIXME: source] and it's dated 08/09/2021, so go forth and delete those samplers responsibly, no cap β­πŸŽ€πŸ§š

πŸ“¦ where this page comes from