IMAGESIZE(3G)
π IMAGESIZE β like, the manual page for imageSize (that's the 3G one, bestie) π
okay so real talk: this is the man page for imageSize, and yes it lives in section 3G because it's a GLSL thing. Let's get into it, no cap. π¦
β¨ NAME β¨
imageSize β retrieve the dimensions of an image π
πΈ DECLARATION πΈ
here's the whole lineup, all the overloads, every single one, periodt:
int imageSize(gimage1D image);
ivec2 imageSize(gimage2D image);
ivec3 imageSize(gimage3D image);
ivec2 imageSize(gimageCube image);
ivec3 imageSize(gimageCubeArray image);
ivec2 imageSize(gimageRect image);
ivec2 imageSize(gimage1DArray image);
ivec3 imageSize(gimage2DArray image);
int imageSize(gimageBuffer image);
ivec2 imageSize(gimage2DMS image);
ivec3 imageSize(gimage2DMSArray image);
π§ PARAMETERS π§
imageβ this is the image you're asking about. like, it specifies the image to which the texture whose dimensions you wanna retrieve is bound. you're basically pointing at it like "her. tell me her size." π
π DESCRIPTION π
imageSize returns the dimensions of the image bound to image. The components in the return value get filled in, in order, with the width, height, and depth of the image. π₯
For the array forms β and you know which ones those are β the last component of the return value is the number of layers in the texture array. iconic behaviour honestly. π
β VERSION SUPPORT β
so the original had this whole grid situation going on, and we can't do tables in here, so let's just lay it out flat. the question is "does imageSize exist in this version of the OpenGL Shading Language?" and the answer is a journey:
imageSizein OpenGL Shading Language Version 1.10 β-(nope)imageSizein OpenGL Shading Language Version 1.20 β-(nope)imageSizein OpenGL Shading Language Version 1.30 β-(nope)imageSizein OpenGL Shading Language Version 1.40 β-(nope)imageSizein OpenGL Shading Language Version 1.50 β-(nope)imageSizein OpenGL Shading Language Version 3.30 β-(nope)imageSizein OpenGL Shading Language Version 4.00 β-(nope)imageSizein OpenGL Shading Language Version 4.10 β-(nope)imageSizein OpenGL Shading Language Version 4.20 β-(nope)imageSizein OpenGL Shading Language Version 4.30 ββ(SHE'S HERE π )imageSizein OpenGL Shading Language Version 4.40 ββ(here)imageSizein OpenGL Shading Language Version 4.50 ββ(here)
so yeah. she showed up in 4.30 and never left. main character energy, honestly. π
π«Ά SEE ALSO π«Ά
go read these too, they're all in the group chat:
textureSize()imageLoad()imageStore()
π 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 (again, bestie) π
Copyright Β© 2011-2014 Khronos Group
ok that's the whole page!! love that for us. πβ¨π
and a lil sign-off for the footer situation: this one came from [FIXME: source] and it's dated 01/03/2018, so that's the vibe. bye bestie, go size some images π¦π
πΈ
π¦ 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