IMAGESTORE(3G)
β¨ IMAGESTORE(3G) β¨
okay bestie, sit down, hydrate, and let me tell you about imageStore β the GLSL function that's literally just "here, take this texel, put it *there". it's in section 3G of the manual, and it's giving very much "I write pixels, that's my whole personality". π
πΈ NAME πΈ
imageStore β write a single texel into an image
like, one texel. singular. no cap.
π DECLARATION π
here's the whole friend group. twelve overloads, all named imageStore, all ready to vibe:
void imageStore(gimage1D image, int P, gvec4 data);
void imageStore(gimage2D image, ivec2 P, gvec4 data);
void imageStore(gimage3D image, ivec3 P, gvec4 data);
void imageStore(gimage2DRect image, ivec2 P, gvec4 data);
void imageStore(gimageCube image, ivec3 P, gvec4 data);
void imageStore(gbufferImage image, int P, gvec4 data);
void imageStore(gimage1DArray image, ivec2 P, gvec4 data);
void imageStore(gimage2DArray image, ivec3 P, gvec4 data);
void imageStore(gimageCubeArray image, ivec3 P, gvec4 data);
void imageStore(gimage2DMS image, ivec2 P, int sample, gvec4 data);
void imageStore(gimage2DMSArray image, ivec3 P, int sample, gvec4 data);
notice how the multisample girlies (gimage2DMS, gimage2DMSArray) get an extra int sample in there? yeah. they're built different. π
π¦ PARAMETERS π¦
imageβ the image unit you're storing a texel into. this is the destination, the final boss, the address on the envelope.Pβ the coordinate where the texel goes. where we're dropping it off. πsampleβ only shows up sometimes (multisample moment), and it says which sample inside the image you're storing into.dataβ the actual data getting stored into the image. the payload. the gift. π
π DESCRIPTION π
so imageStore stores data into the texel at coordinate P, in the image specified by image. that's it, that's the whole job. for multi-sample stores, the sample number comes from sample.
when image, P, and sample all identify a valid texel, the bits used to represent data get converted to the format of the image unit β in the manner described in the OpenGL Specification β and then stored to that specified texel.
β οΈ key phrase alert: valid texel. if those three don't point at something real, that's not a "we'll figure it out" situation, bestie. check your coordinates. π₯
β VERSION SUPPORT β
the vibe check on when imageStore was even allowed to exist. the table in the original is:
Function Name: imageStore
OpenGL Shading Language Version:
1.10β-1.20β-1.30β-1.40β-1.50β-3.30β-4.00β-4.10β-4.20ββ4.30ββ4.40ββ4.50ββ
so yeah. she didn't exist until GLSL 4.20, and then she ate every version after. iconic behavior, honestly. π
β¨
π SEE ALSO π
the whole entourage, go say hi:
imageLoad()imageAtomicAdd()imageAtomicMin()imageAtomicMax()imageAtomicAnd()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 π
Copyright Β© 2011-2014 Khronos Group
okay that's the whole page, bestie π«Ά go forth and store texels responsibly. this was [FIXME: source], dated 01/03/2018, and you can find her filed under IMAGESTORE(3G) β mwah, love u, bye πβ¨π
π¦ 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