GLTEXSTORAGE3DMULTIS(3G)
π glTexStorage3DMultisample(3G) π
okay bestie, welcome to the <pink>glTexStorage3DMultisample(3G)</pink> manual page β we're doing texture storage setup and it's giving main character energy β¨
πΈ NAME πΈ
glTexStorage3DMultisample, glTextureStorage3DMultisample β specify storage for a two-dimensional multisample array texture. periodt. π
β¨ C SPECIFICATION β¨
void glTexStorage3DMultisample(GLenum target, GLsizei samples,
GLenum internalformat, GLsizei width,
GLsizei height, GLsizei depth,
GLboolean fixedsamplelocations);
void glTextureStorage3DMultisample(GLuint texture, GLsizei samples,
GLenum internalformat, GLsizei width,
GLsizei height, GLsizei depth,
GLboolean fixedsamplelocations);
π PARAMETERS π
targetβ specifies the target to which the texture object is bound forglTexStorage3DMultisample. Must be one ofGL_TEXTURE_2D_MULTISAMPLE_ARRAYorGL_PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY. no cap, those are the only two π«textureβ specifies the texture object name forglTextureStorage3DMultisample. The effective target oftexturemust be one of the valid non-proxy target values above. iykyk π«Άsamplesβ specify the number of samples in the texture.internalformatβ specifies the sized internal format to be used to store texture image data.widthβ specifies the width of the texture, in texels.heightβ specifies the height of the texture, in texels.depthβ specifies the depth of the texture, in layers.fixedsamplelocationsβ specifies whether the image will use identical sample locations and the same number of samples for all texels in the image, and the sample locations will not depend on the internal format or size of the image. iconic behavior honestly π
π¦ DESCRIPTION π¦
glTexStorage3DMultisample and glTextureStorage3DMultisample specify the storage requirements for a two-dimensional multisample array texture. Once a texture is specified with this command, its format and dimensions become immutable unless it is a proxy texture. The contents of the image may still be modified, however, its storage requirements may not change. Such a texture is referred to as an immutable-format texture. lock it in bestie πβ¨
samples specifies the number of samples to be used for the texture and must be greater than zero and less than or equal to the value of GL_MAX_SAMPLES. internalformat must be a color-renderable, depth-renderable, or stencil-renderable format. width and height specify the width and height, respectively, of the texture and depth specifies the depth (or the number of layers) of the texture. If fixedsamplelocations is GL_TRUE, the image will use identical sample locations and the same number of samples for all texels in the image, and the sample locations will not depend on the internal format or size of the image. the way that's so specific β we love a consistent queen ππ¦
π Table 1. Sized Internal Formats (the rest of it) π
Okay bestie, this is the full sized-internal-formats board β every row, exactly as printed, no editorialising from me. Quick heads-up before you scroll: a bunch of the bit counts come with a little prefix attached (s8, s16, f16, ui10, ui2), and the Shared Bits column is blank on every single row here, so I'm calling that out once instead of twenty-eight times. Copy what you see, character for character. π
GL_R8β baseGL_RED. Red8; green, blue, alpha and shared bits are blank.GL_R8_SNORMβ baseGL_RED. Reds8; green, blue, alpha and shared bits blank.GL_R16β baseGL_RED. Red16; green, blue, alpha and shared bits blank.GL_R16_SNORMβ baseGL_RED. Reds16; green, blue, alpha and shared bits blank.GL_RG8β baseGL_RG. Red8, green8; blue, alpha and shared bits blank.GL_RG8_SNORMβ baseGL_RG. Reds8, greens8; blue, alpha and shared bits blank.GL_RG16β baseGL_RG. Red16, green16; blue, alpha and shared bits blank.GL_RG16_SNORMβ baseGL_RG. Reds16, greens16; blue, alpha and shared bits blank.GL_R3_G3_B2β baseGL_RGB. Red3, green3, blue2; alpha and shared bits blank.GL_RGB4β baseGL_RGB. Red4, green4, blue4; alpha and shared bits blank.GL_RGB5β baseGL_RGB. Red5, green5, blue5; alpha and shared bits blank.GL_RGB8β baseGL_RGB. Red8, green8, blue8; alpha and shared bits blank.GL_RGB8_SNORMβ baseGL_RGB. Reds8, greens8, blues8; alpha and shared bits blank.GL_RGB10β baseGL_RGB. Red10, green10, blue10; alpha and shared bits blank.GL_RGB12β baseGL_RGB. Red12, green12, blue12; alpha and shared bits blank.GL_RGB16_SNORMβ baseGL_RGB. Red16, green16, blue16; alpha and shared bits blank. (Yep β that's how the table writes it. I'm the messenger, not the editor. π«Ά)GL_RGBA2β baseGL_RGB. Red2, green2, blue2, alpha2; shared bits blank. (Base saysGL_RGB, the name says RGBA β again, exactly as printed. π)GL_RGBA4β baseGL_RGB. Red4, green4, blue4, alpha4; shared bits blank.GL_RGB5_A1β baseGL_RGBA. Red5, green5, blue5, alpha1; shared bits blank.GL_RGBA8β baseGL_RGBA. Red8, green8, blue8, alpha8; shared bits blank.GL_RGBA8_SNORMβ baseGL_RGBA. Reds8, greens8, blues8, alphas8; shared bits blank.GL_RGB10_A2β baseGL_RGBA. Red10, green10, blue10, alpha2; shared bits blank.GL_RGB10_A2UIβ baseGL_RGBA. Redui10, greenui10, blueui10, alphaui2; shared bits blank.GL_RGBA12β baseGL_RGBA. Red12, green12, blue12, alpha12; shared bits blank.GL_RGBA16β baseGL_RGBA. Red16, green16, blue16, alpha16; shared bits blank.GL_SRGB8β baseGL_RGB. Red8, green8, blue8; alpha and shared bits blank.GL_SRGB8_ALPHA8β baseGL_RGBA. Red8, green8, blue8, alpha8; shared bits blank.GL_R16Fβ baseGL_RED. Redf16; green, blue, alpha and shared bits blank.
Ngl, that's a whole lot of formats and every last one of them is here β nothing skipped, nothing merged, nothing "cleaned up". β¨
GL_RG16Fβ formatGL_RG, redf16, greenf16πGL_RGB16Fβ formatGL_RGB, redf16, greenf16, bluef16GL_RGBA16Fβ formatGL_RGBA, redf16, greenf16, bluef16, alphaf16β¨GL_R32Fβ formatGL_RED, redf32GL_RG32Fβ formatGL_RG, redf32, greenf32GL_RGB32Fβ formatGL_RGB, redf32, greenf32, bluef32GL_RGBA32Fβ formatGL_RGBA, redf32, greenf32, bluef32, alphaf32π₯
ok so that whole stretch was the float girlies β f16 then f32, living their best floaty lives. no cap, very demure, very mindless. now we get the weird ones and honestly? iconic behaviour ahead π«Ά
GL_R11F_G11F_B10Fβ formatGL_RGB, redf11, greenf11, bluef10β yes bestie, the bits are uneven, it's giving chaos but make it efficient πGL_RGB9_E5β formatGL_RGB, red9, green9, blue9, and a shared-exponent value of5in that last column π
lowkey obsessed with GL_RGB9_E5 because it's the only one on this whole page that uses that shared column for real. main character energy fr fr.
and now, the integer era π buckle up, there are like a million of these and they're all extremely same-but-different. the pattern is genuinely simple though β I means signed, UI means unsigned, the number is the bit width, and R/RG/RGB/RGBA tells you how many channels get that width. slay, honestly.
GL_R8Iβ formatGL_RED, redi8GL_R8UIβ formatGL_RED, redui8GL_R16Iβ formatGL_RED, redi16GL_R16UIβ formatGL_RED, redui16GL_R32Iβ formatGL_RED, redi32GL_R32UIβ formatGL_RED, redui32GL_RG8Iβ formatGL_RG, redi8, greeni8GL_RG8UIβ formatGL_RG, redui8, greenui8GL_RG16Iβ formatGL_RG, redi16, greeni16GL_RG16UIβ formatGL_RG, redui16, greenui16GL_RG32Iβ formatGL_RG, redi32, greeni32GL_RG32UIβ formatGL_RG, redui32, greenui32GL_RGB8Iβ formatGL_RGB, redi8, greeni8, bluei8GL_RGB8UIβ formatGL_RGB, redui8, greenui8, blueui8GL_RGB16Iβ formatGL_RGB, redi16, greeni16, bluei16GL_RGB16UIβ formatGL_RGB, redui16, greenui16, blueui16GL_RGB32Iβ formatGL_RGB, redi32, greeni32, bluei32GL_RGB32UIβ formatGL_RGB, redui32, greenui32, blueui32GL_RGBA8Iβ formatGL_RGBA, redi8, greeni8, bluei8, alphai8πΈGL_RGBA8UIβ formatGL_RGBA, redui8, greenui8, blueui8, alphaui8GL_RGBA16Iβ formatGL_RGBA, redi16, greeni16, bluei16, alphai16GL_RGBA16UIβ formatGL_RGBA, redui16, greenui16, blueui16, alphaui16π
SEE? told you it was a pattern π once you clock that it's just signedness + bit width + channel count, you can basically read the rest of this table on vibes alone. and there's still more coming, because of course there is β the 32-bit RGBA integer crew and friends are right around the corner, so likeβ¦ stay with me bestie π
...and the last two rows of the format table, same energy, same columns:
β GL_RGBA32I β GL_RGBA β i32 β i32 β i32 β i32 β β
βββββββββββββββββββββΌβββββββββββΌβββββββββββΌβββββββββββββΌββββββββββββΌβββββββββββββΌβββββββββ€
β GL_RGBA32UI β GL_RGBA β ui32 β ui32 β ui32 β ui32 β β
βββββββββββββββββββββ΄βββββββββββ΄βββββββββββ΄βββββββββββββ΄ββββββββββββ΄βββββββββββββ΄βββββββββ
okay bestie, table's done, deep breath, now the part everyone skims and then regrets skimming π
π¨ ERRORS π¨
Like, these are the ways you can mess up. Read them. Please. For me. π₯Ί
GL_INVALID_OPERATIONis generated byglTexStorage3DMultisampleif zero is bound totarget. (nothing there, nothing to work with π)GL_INVALID_OPERATIONis generated byglTextureStorage3DMultisampleiftextureis not the name of an existing texture object. (girl, that texture does not exist π)GL_INVALID_ENUMis generated ifinternalformatis not a valid color-renderable, depth-renderable or stencil-renderable format. (renderable is the vibe check here, it has to pass)GL_INVALID_ENUMis generated iftargetor the effective target oftextureis not one of the accepted targets described above.GL_INVALID_VALUEis generated ifwidthorheightare less than1or greater than the value ofGL_MAX_TEXTURE_SIZE. (1 is the floor, ok?)GL_INVALID_VALUEis generated ifdepthis less than1or greater than the value ofGL_MAX_ARRAY_TEXTURE_LAYERS.GL_INVALID_VALUEis generated iflevelsis less than1.GL_INVALID_VALUEis generated ifsamplesis zero. (zero samples is giving nothing, and we do not stan nothing)GL_INVALID_OPERATIONis generated ifsamplesis greater than the maximum number of samples supported for thistargetandinternalformat.GL_INVALID_OPERATIONis generated if the value ofGL_TEXTURE_IMMUTABLE_FORMATfor the texture bound totargetis notGL_FALSE. (immutable means immutable, bestie β it's immutable π )
tl;dr if it's complaining, it's almost always: bad format, bad target, a number out of range, or you already locked this texture down. Check the list before you spiral. π«Ά
π ASSOCIATED GETS π
Stuff you can ask the GL about with glGetInteger with arguments GL_MAX_TEXTURE_SIZE, GL_MAX_ARRAY_TEXTURE_LEVELS, GL_TEXTURE_VIEW_MIN_LAYER, GL_TEXTURE_VIEW_NUM_LAYERS, or GL_TEXTURE_IMMUTABLE_LEVELS.
(ngl this is the "who am I, where am I, what are my limits" section and honestly relatable β¨)
π VERSION SUPPORT π
Here's the whole grid, verbatim, because I would never gatekeep an OpenGL version table from you π
βββββββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β β OpenGL Version β
βββββββββββββββββββββββββββββββββΌββββββ¬ββββββ¬ββββββ¬ββββββ¬ββββββ¬ββββββ¬ββββββ¬ββββββ¬ββββββ¬ββββββ¬ββββββ¬ββββββ€
β Function β 2.0 β 2.1 β 3.0 β 3.1 β 3.2 β 3.3 β 4.0 β 4.1 β 4.2 β 4.3 β 4.4 β 4.5 β
β / β β β β β β β β β β β β β
β Feature β β β β β β β β β β β β β
β Name β β β β β β β β β β β β β
βββββββββββββββββββββββββββββββββΌββββββΌββββββΌββββββΌββββββΌββββββΌββββββΌββββββΌββββββΌββββββΌββββββΌββββββΌββββββ€
β glTexStorage3DMultisample β - β - β - β - β - β - β - β - β - β β β β β β β
βββββββββββββββββββββββββββββββββΌββββββΌββββββΌββββββΌββββββΌββββββΌββββββΌββββββΌββββββΌββββββΌββββββΌββββββΌββββββ€
β glTextureStorage3DMultisample β - β - β - β - β - β - β - β - β - β - β - β β β
βββββββββββββββββββββββββββββββββ΄ββββββ΄ββββββ΄ββββββ΄ββββββ΄ββββββ΄ββββββ΄ββββββ΄ββββββ΄ββββββ΄ββββββ΄ββββββ΄ββββββ
so like π«Ά glTexStorage3DMultisample shows up at 4.3 and stays through 4.4 and 4.5, and glTextureStorage3DMultisample is a 4.5-only icon, no earlier dashes for her. the - means not supported, don't try it π
π¦ SEE ALSO π¦
the whole friend group, go say hi:
glTexImage3D()glTexImage3DMultisample()glTexStorage1D()glTexStorage2DMultisample()glTexStorage3D()
π COPYRIGHT π
Copyright Β© 2013-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 Β© 2013-2014 Khronos Group
(yes bestie, it really does say it twice. the manpage said it, so I said it. periodt π)
and that's the whole page!! you made it to the bottom, I'm so proud of you π₯Ήπ the source is a lil [FIXME: source] placeholder situation and the version/date on this one is 08/09/2021, stamped with GLTEXSTORAGE3DMULTIS(3G). now go forth and multisample responsibly, ily, bye π
β¨π
π¦ where this page comes from
- centos-stream 9: gl-manpages 1.1-24.20190306.el9 Β· MIT and Open Publication
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms