IMAGEATOMICAND(3G)
π IMAGEATOMICAND β the imageAtomicAnd tea, served fresh π
okay bestie, pull up a chair because we're talking about imageAtomicAnd from the OpenGL Shading Language family, manual section 3G. she's an atomic queen and she's here to AND your values together without any race-condition drama. no cap. π
πΈ NAME πΈ
imageAtomicAnd β atomically compute the logical AND of a value with an existing value in memory, store that value and return the original value.
periodt. that's the whole vibe. π
β¨ DECLARATION β¨
here's the full roster of glow-ups β every single signature, no skips, no cuts, because we don't gatekeep:
uint imageAtomicAnd(gimage1D image, int P, uint data);
uint imageAtomicAnd(gimage2D image, ivec2 P, uint data);
uint imageAtomicAnd(gimage3D image, ivec3 P, uint data);
uint imageAtomicAnd(gimage2DRect image, ivec2 P, uint data);
uint imageAtomicAnd(gimageCube image, ivec3 P, uint data);
uint imageAtomicAnd(gbufferImage image, int P, uint data);
uint imageAtomicAnd(gimage1DArray image, ivec2 P, uint data);
uint imageAtomicAnd(gimage2DArray image, ivec3 P, uint data);
uint imageAtomicAnd(gimageCubeArray image, ivec3 P, uint data);
uint imageAtomicAnd(gimage2DMS image, ivec2 P, int sample, uint data);
uint imageAtomicAnd(gimage2DMSArray image, ivec3 P, int sample,
uint data);
int imageAtomicAnd(gimage1D image, int P, int data);
int imageAtomicAnd(gimage2D image, ivec2 P, int data);
int imageAtomicAnd(gimage3D image, ivec3 P, int data);
int imageAtomicAnd(gimage2DRect image, ivec2 P, int data);
int imageAtomicAnd(gimageCube image, ivec3 P, int data);
int imageAtomicAnd(gbufferImage image, int P, int data);
int imageAtomicAnd(gimage1DArray image, ivec2 P, int data);
int imageAtomicAnd(gimage2DArray image, ivec3 P, int data);
int imageAtomicAnd(gimageCubeArray image, ivec3 P, int data);
int imageAtomicAnd(gimage2DMS image, ivec2 P, int sample, int data);
int imageAtomicAnd(gimage2DMSArray image, ivec3 P, int sample,
int data);
the way she has a uint version AND an int version?? versatile icon behavior, honestly. π
π¦ PARAMETERS π¦
imageβ the image unit you're storingdatainto. like, where the magic happens. β¨Pβ the coordinate at which to store the data. this is the spot, the location, the address of the whole situation. πsampleβ when she shows up, she specifies the sample within the image to store into. present only in the multisample forms, iykyk.dataβ the data to logically AND into the image. she's the guest of honor. π«Ά
π DESCRIPTION π
so here's what's going down, bestie:
imageAtomicAnd atomically computes a new value by logically ANDing the value of data to the contents of the texel at coordinate P and sample in the image bound to uint image, stores that value into the image, and returns the original value.
like β she does the AND, she writes the result, and she hands you back what was there before. atomic means no other thread can sneak in mid-operation and mess with your math. it's giving main character energy with impeccable boundaries. π β¨
β VERSION SUPPORT β
the original page has this as a big fancy table, but tables are not the vibe here so we're laying it out as a list. same facts, cuter delivery:
Function name: imageAtomicAnd
the columns are OpenGL Shading Language Version:
1.10β-(nope, not yet babe)1.20β-1.30β-1.40β-1.50β-3.30β-4.00β-4.10β-4.20ββ(she's HERE π)4.30ββ4.40ββ4.50ββ
so from 4.20 onward she's fully supported, and before that it's just dashes. glow-up era started at 4.20 and she never looked back. π
πΈ SEE ALSO πΈ
go give these girlies some love too, they're all in the same friend group:
imageLoad(), imageStore(), imageAtomicAdd(), imageAtomicMin(), imageAtomicMax(), imageAtomicOr(), imageAtomicXor(), imageAtomicExchange(), imageAtomicCompSwap()
π COPYRIGHT π
Copyright Β© 2011-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 (yes, again, she said it twice) π
Copyright Β© 2011-2014 Khronos Group
quick reminder bestie: everything above is the real spec, verbatim where it counts β I just wrapped it in glitter. don't come for me, come for the texels. π
and that's the whole page, fr fr. this came from the [FIXME: source] build, dated 01/03/2018, sitting in manual section IMAGEATOMICAND(3G). go forth and AND atomically, queen. πβ¨π
π¦ where this page comes from
- ubuntu jammy: opengl-4-man-doc 1.0~svn33624-1 Β· SGI-Free-Software-B-License-2
- ubuntu noble: opengl-4-man-doc 1.0~svn33624-1 Β· SGI-Free-Software-B-License-2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms