GLTEXSTORAGE2DMULTIS(3G)
Okay bestie, welcome to the GLTEXSTORAGE2DMULTIS(3G) page β yes, the header literally includes [FIXME: manual], placeholder era, we move. π
This one covers glTexStorage2DMultisample and glTextureStorage2DMultisample, aka the functions that set up storage for a two-dimensional multisample texture. β¨
πΈ NAME πΈ
glTexStorage2DMultisample, glTextureStorage2DMultisample β specify storage for a two-dimensional multisample texture. That's the whole vibe: these functions lock in storage for a 2D multisample texture, periodt. π
β¨ C SPECIFICATION β¨
Here's the exact C-level tea, bestie:
void glTexStorage2DMultisample(GLenum target, GLsizei samples,
GLenum internalformat, GLsizei width,
GLsizei height,
GLboolean fixedsamplelocations);
void glTextureStorage2DMultisample(GLuint texture, GLsizei samples,
GLenum internalformat, GLsizei width,
GLsizei height,
GLboolean fixedsamplelocations);
π PARAMETERS π
targetβ the target the texture object is bound to forglTexStorage2DMultisample, bestie. It must be one ofGL_TEXTURE_2D_MULTISAMPLEorGL_PROXY_TEXTURE_2D_MULTISAMPLE. No other target is invited to this party. π¦textureβ the texture object name forglTextureStorage2DMultisample. The effective target oftexturemust be one of the valid non-proxy target values above β iykyk, not the proxy one. πsamplesβ the number of samples in the texture. Simple as that. πΈinternalformatβ the sized internal format used to store texture image data. Sized, okay? It's giving very specific storage requirements. πwidthβ the width of the texture, in texels. πheightβ the height of the texture, in texels. πfixedsamplelocationsβ whether the image will use identical sample locations and the same number of samples for all texels in the image, and whether the sample locations will not depend on the internal format or size of the image. So: same locations, same sample count, no format/size drama. π«Ά
π¦ DESCRIPTION π¦
glTexStorage2DMultisample and glTextureStorage2DMultisample specify the storage requirements for a two-dimensional multisample 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. π§
So samples specifies the number of samples to be used for the texture, and it 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. 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. π₯
π Table 1. Sized Internal Formats
okay bestie, this is the big one β the full menu of sized internal formats. Every row gives you the sized format on the left, the base internal format it maps to, then how many red, green, blue, alpha and shared bits you get. Heads up: the Shared Bits column is empty for literally every single row here β she's not beating the empty allegations π. Empty cells are justβ¦ empty, so I'm only calling out the ones that actually have numbers. No cap.
GL_R8β baseGL_RED, red bits8. just vibes and one channel πGL_R8_SNORMβ baseGL_RED, red bitss8GL_R16β baseGL_RED, red bits16GL_R16_SNORMβ baseGL_RED, red bitss16GL_RG8β baseGL_RG, red bits8, green bits8GL_RG8_SNORMβ baseGL_RG, red bitss8, green bitss8GL_RG16β baseGL_RG, red bits16, green bits16GL_RG16_SNORMβ baseGL_RG, red bitss16, green bitss16GL_R3_G3_B2β baseGL_RGB, red bits3, green bits3, blue bits2. yes the blue girlie gets fewer bits, that's the whole name, periodt πGL_RGB4β baseGL_RGB, red bits4, green bits4, blue bits4GL_RGB5β baseGL_RGB, red bits5, green bits5, blue bits5GL_RGB8β baseGL_RGB, red bits8, green bits8, blue bits8GL_RGB8_SNORMβ baseGL_RGB, red bitss8, green bitss8, blue bitss8GL_RGB10β baseGL_RGB, red bits10, green bits10, blue bits10GL_RGB12β baseGL_RGB, red bits12, green bits12, blue bits12GL_RGB16_SNORMβ baseGL_RGB, red bits16, green bits16, blue bits16GL_RGBA2β baseGL_RGB, red bits2, green bits2, blue bits2, alpha bits2π yes, you read the base column right, don't come for me, I'm just reading the tableGL_RGBA4β baseGL_RGB, red bits4, green bits4, blue bits4, alpha bits4GL_RGB5_A1β baseGL_RGBA, red bits5, green bits5, blue bits5, alpha bits1. that alpha is fighting for its life fr fr πGL_RGBA8β baseGL_RGBA, red bits8, green bits8, blue bits8, alpha bits8. the icon, the moment πGL_RGBA8_SNORMβ baseGL_RGBA, red bitss8, green bitss8, blue bitss8, alpha bitss8GL_RGB10_A2β baseGL_RGBA, red bits10, green bits10, blue bits10, alpha bits2GL_RGB10_A2UIβ baseGL_RGBA, red bitsui10, green bitsui10, blue bitsui10, alpha bitsui2. thoseuiprefixes are doing main character work β¨GL_RGBA12β baseGL_RGBA, red bits12, green bits12, blue bits12, alpha bits12GL_RGBA16β baseGL_RGBA, red bits16, green bits16, blue bits16, alpha bits16GL_SRGB8β baseGL_RGB, red bits8, green bits8, blue bits8. sRGB girlies rise πGL_SRGB8_ALPHA8β baseGL_RGBA, red bits8, green bits8, blue bits8, alpha bits8GL_R16Fβ baseGL_RED, red bitsf16. float vibes π¦
β¦okay bestie, we're still in the format chart, keep scrolling with me π the pattern is always the same: internal format, then its base format, then what each channel actually holds. lowkey satisfying once you see it.
GL_RG16Fβ baseGL_RG, channelsf16,f16πGL_RGB16Fβ baseGL_RGB, channelsf16,f16,f16β¨GL_RGBA16Fβ baseGL_RGBA, channelsf16,f16,f16,f16π
and now the 32-bit crowd, they're giving main character energy:
GL_R32Fβ baseGL_RED, channelf32π¦GL_RG32Fβ baseGL_RG, channelsf32,f32πΈGL_RGB32Fβ baseGL_RGB, channelsf32,f32,f32πGL_RGBA32Fβ baseGL_RGBA, channelsf32,f32,f32,f32π₯
then we get the little weird ones (affectionate) where the channels aren't all the same size:
GL_R11F_G11F_B10Fβ baseGL_RGB, channelsf11,f11,f10πGL_RGB9_E5β baseGL_RGB, channels9,9,9, plus a shared value of5π
bestie note: that last column is the shared-bits column, and it's empty for literally everything else in this stretch.GL_RGB9_E5is the only one carrying a5in it. iykyk π
now the integer girlies, signed and unsigned, and yes every single one is listed because we don't skip:
GL_R8Iβ baseGL_RED, channeli8βGL_R8UIβ baseGL_RED, channelui8πGL_R16Iβ baseGL_RED, channeli16πGL_R16UIβ baseGL_RED, channelui16πGL_R32Iβ baseGL_RED, channeli32π§GL_R32UIβ baseGL_RED, channelui32β¨
two-channel versions, same deal:
GL_RG8Iβ baseGL_RG, channelsi8,i8πGL_RG8UIβ baseGL_RG, channelsui8,ui8π¦GL_RG16Iβ baseGL_RG, channelsi16,i16πΈGL_RG16UIβ baseGL_RG, channelsui16,ui16πGL_RG32Iβ baseGL_RG, channelsi32,i32πGL_RG32UIβ baseGL_RG, channelsui32,ui32π
three-channel, she's growing:
GL_RGB8Iβ baseGL_RGB, channelsi8,i8,i8πGL_RGB8UIβ baseGL_RGB, channelsui8,ui8,ui8π₯GL_RGB16Iβ baseGL_RGB, channelsi16,i16,i16βGL_RGB16UIβ baseGL_RGB, channelsui16,ui16,ui16π§GL_RGB32Iβ baseGL_RGB, channelsi32,i32,i32πGL_RGB32UIβ baseGL_RGB, channelsui32,ui32,ui32π
and the four-channel full set, ate and left no crumbs:
GL_RGBA8Iβ baseGL_RGBA, channelsi8,i8,i8,i8πGL_RGBA8UIβ baseGL_RGBA, channelsui8,ui8,ui8,ui8π¦GL_RGBA16Iβ baseGL_RGBA, channelsi16,i16,i16,i16πΈGL_RGBA16UIβ baseGL_RGBA, channelsui16,ui16,ui16,ui16π
and that's exactly where this chunk of the chart pauses, bestie β the list keeps going, so stay with me π«Ά
β¦and the last of the table rows round it out like this β¨
GL_RGBA32IβGL_RGBA,i32,i32,i32,i32GL_RGBA32UIβGL_RGBA,ui32,ui32,ui32,ui32
π ERRORS π
Bestie, here's the full receipts on what goes wrong and which error flag you get for it. Memorize these, they will absolutely show up in your life π
GL_INVALID_OPERATIONβ thrown byglTexStorage2DMultisampleif zero is bound to target.GL_INVALID_OPERATIONβ thrown byglTextureStorage2DMultisampleif texture is not the name of an existing texture object.GL_INVALID_ENUMβ thrown if internalformat is not a valid color-renderable, depth-renderable or stencil-renderable format.GL_INVALID_ENUMβ thrown if target, or the effective target of texture, is not one of the accepted targets described above.GL_INVALID_VALUEβ thrown if width or height are less than 1 or greater than the value ofGL_MAX_TEXTURE_SIZE.GL_INVALID_VALUEβ thrown if levels is less than 1.GL_INVALID_VALUEβ thrown if samples is zero.GL_INVALID_OPERATIONβ thrown if samples is greater than the maximum number of samples supported for this target and internalformat.GL_INVALID_OPERATIONβ thrown if the value ofGL_TEXTURE_IMMUTABLE_FORMATfor the texture bound to target is notGL_FALSE.
π«Ά Real talk: that last one is the vibe check. If your texture's already immutable, you can't re-spec it. Periodt.
π VERSION SUPPORT π
So which OpenGL versions actually have these? Buckle up, it's giving "late to the party" for both of them π
The columns across the top are the OpenGL versions: 2.0, 2.1, 3.0, 3.1, 3.2, 3.3, 4.0, 4.1, 4.2, 4.3, 4.4, 4.5.
glTexStorage2DMultisampleβ-in2.0,-in2.1,-in3.0,-in3.1,-in3.2,-in3.3,-in4.0,-in4.1,-in4.2, then β in4.3, β in4.4, β in4.5.glTextureStorage2DMultisampleβ-all the way down through2.0,2.1,3.0,3.1,3.2,3.3,4.0,4.1,4.2,4.3,4.4, and only β in4.5. She's the newest of the new, the main character of 4.5 πβ¨
π¦ SEE ALSO π¦
Go read these next, they're the friends of this function, iykyk:
glTexImage2D()glTexImage2DMultisample()glTexStorage1D()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 Β© 2013-2014 Khronos Group
π Yes bestie, the copyright block shows up twice in the original β the second one is just the short version without the license prose. Not me leaving it out, I would never π
And that's the whole page, fr fr π
(Sourced from [FIXME: source], dated 08/09/2021 β the one and only GLTEXSTORAGE2DMULTIS(3G). Slay, go forth and multisample responsibly πΈ)
π¦ 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