Specifies the maximum number of basic machine units that may be written to params​ by the function.

params

Specifies the address of a variable into which to write the retrieved information.

Description

glGetInternalformativ and glGetInternalformati64v retrieve information about implementation-dependent support for internal formats. target​ indicates the target with which the internal format will be used and must be one of GL_RENDERBUFFER​, GL_TEXTURE_2D_MULTISAMPLE​, or GL_TEXTURE_2D_MULTISAMPLE_ARRAY​, corresponding to usage as a renderbuffer, two-dimensional multisample texture or two-dimensional multisample array texture, respectively.

internalformat​ specifies the internal format about which to retrieve information and must be a color-renderable, depth-renderable or stencil-renderable format.

The information retrieved will be written to memory addressed by the pointer specified in params​. No more than bufSize​ basic machine units will be written to this memory.

The possible values for pname​, and the associated value(s) copied into params​ are:

GL_NUM_SAMPLE_COUNTS​

The number of sample counts that would be returned by querying GL_SAMPLES​.

GL_SAMPLES​

The sample counts supported for internalformat​ and target​ are written into params​ in descending numeric order. Only positive values are returned. Querying GL_SAMPLES​ with bufSize​ of one will return just the maximum supported number of samples for this format. The maximum value in GL_SAMPLES​ is guaranteed to be at least the lowest of the following: * The value of GL_MAX_INTEGER_SAMPLES​ if internalformat​ is a signed or unsigned integer format.* The value of GL_MAX_DEPTH_TEXTURE_SAMPLES​ if internalformat​ is a depth- or stencil-renderable format and target​ is GL_TEXTURE_2D_MULTISAMPLE​, GL_TEXTURE_2D_MULTISAMPLE_ARRAY​.* The value of GL_MAX_COLOR_TEXTURE_SAMPLES​ if internalformat​ is a color-renderable format and target​ is GL_TEXTURE_2D_MULTISAMPLE​ or GL_TEXTURE_2D_MULTISAMPLE_ARRAY​.* The value of GL_MAX_SAMPLES​.

GL_INTERNALFORMAT_SUPPORTED​

GL_TRUE​ if internalFormat​ is a supported internal format for target​ and to GL_FALSE​ otherwise. "Supported" in this case only means that the internal format is one of the sized internal formats. It has nothing to do with hardware support.

GL_INTERNALFORMAT_PREFERRED​

The internal format that the implementation will actually use when given internalformat​.

The actual resolutions that would be used for storing image array components for the resource for the red, green, blue, alpha, depth, stencil and shared channels respectively. If internalFormat​ is a compressed internal format, then params​ is set to the component resolution of an uncompressed internal format that produces an image of roughly the same quality as the compressed algorithm. If the internal format is unsupported, or if a particular component is not present in the format, 0 is written to params​.

A token identifying the data type used to store the respective component. If the internalFormat​ represents a compressed internal format then the types returned specify how components are interpreted after decompression.

The maximum combined dimensions for the internal format. The combined dimensions is the product of the individual dimensions of the resource. For multisampled surfaces the number of samples is considered an additional dimension. Note that the value returned can be >= 2^32 and should be queried with the 64-bit query. This value should be considered a recommendations for applications. There may be system-dependant reasons why allocations larger than this size may fail, even if there might appear to be sufficient memory available when queried via some other means. This also does not provide a guarantee that allocations smaller than this will succeed because this value is not affected by existing resource allocations.

GL_COLOR_COMPONENTS​

GL_TRUE​ if the internal format contains any color component (i.e., red, green, blue or alpha) and to GL_FALSE​ otherwise.

GL_DEPTH_COMPONENTS​ or GL_STENCIL_COMPONENTS​

GL_TRUE​ if the internal format contains a depth or stencil component, respectively, and to GL_FALSE​ otherwise.

GL_COLOR_RENDERABLE​, GL_DEPTH_RENDERABLE​ or GL_STENCIL_RENDERABLE​

GL_TRUE​ if the specified internal format is color, depth or stencil renderable, respectively, and to GL_FALSE​ otherwise.

GL_FRAMEBUFFER_RENDERABLE​ or GL_FRAMEBUFFER_RENDERABLE_LAYERED​

GL_FULL_SUPPORT​, GL_CAVEAT_SUPPORT​ or GL_NONE​ to indicate that framebuffer attachments (layered attachments in the case of GL_FRAMEBUFFER_RENDERABLE_LAYERED​) with that internal format are either renderable with no restrictions, renderable with some restrictions or not renderable at all.

GL_FRAMEBUFFER_BLEND​

GL_FULL_SUPPORT​, GL_CAVEAT_SUPPORT​ or GL_NONE​ to indicate full support, limited support or no support for blending operations with the internal format when attached to a framebuffer.

GL_READ_PIXELS​

GL_FULL_SUPPORT​, GL_CAVEAT_SUPPORT​ or GL_NONE​ to that either full support, limited support or no support at all is supplied for reading pixels from framebuffer attachments in the specified internal format.

GL_READ_PIXELS_FORMAT​ or GL_READ_PIXELS_TYPE​

the implementation-recommended format or type to be used in calls to glReadPixels​. For GL_READ_PIXELS_FORMAT​, the value returned in params​ is a token that is accepted for the format​ argument to glReadPixels​. For GL_READ_PIXELS_TYPE​, the value returned in params​ is a token that is accepted for the type​ argument to glReadPixels​.

GL_TEXTURE_IMAGE_FORMAT​ or GL_TEXTURE_IMAGE_TYPE​

The implementation-recommended format or type to be used in calls to glTexImage2D​ and other similar functions. For GL_TEXTURE_IMAGE_FORMAT​, params​ is filled with a token suitable for use as the format​ argument to glTexImage2D​. For GL_TEXTURE_IMAGE_TYPE​, params​ is filled with a token suitable for use as the type​ argument to glTexImage2D​.

GL_GET_TEXTURE_IMAGE_FORMAT​ or GL_GET_TEXTURE_IMAGE_TYPE​

The implementation-recommended format or type to be used in calls to glGetTexImage​ and other similar functions. For GL_GET_TEXTURE_IMAGE_FORMAT​, params​ is filled with a token suitable for use as the format​ argument to glGetTexImage​. For GL_GET_TEXTURE_IMAGE_TYPE​, params​ is filled with a token suitable for use as the type​ argument to glGetTexImage​.

GL_MIPMAP​

GL_TRUE​ if the specified internal format supports mipmaps and to GL_FALSE​ otherwise.

GL_MANUAL_GENERATE_MIPMAP​

The level of support for manual mipmap generation for the specified internal format. Returned values may be one of GL_FULL_SUPPORT​, GL_CAVEAT_SUPPORT​ and GL_NONE​ to indicate either full support, limited support or no support at all.

GL_COLOR_ENCODING​

The color encoding for the resource. Possible values for color buffers are GL_LINEAR​ or GL_SRGB​, for linear or sRGB-encoded color components, respectively. For non-color formats (such as depth or stencil), or for unsupported resources, the value GL_NONE​ is returned.

GL_SRGB_READ​, or GL_SRGB_WRITE​

The level of support for reading and writing to sRGB encoded images, respectively. For GL_SRGB_READ​, support for converting from sRGB colorspace on read operations is returned in params​ and for GL_SRGB_WRITE​, support for converting to sRGB colorspace on write operations to the resource is returned in params​. params​ may be set to GL_FULL_SUPPORT​, GL_CAVEAT_SUPPORT​, or GL_NONE​ to indicate full support, limited support or no support at all, respectively.

GL_FILTER​

GL_TRUE​ or GL_FALSE​ to indicate support or lack thereof for filter modes other than GL_NEAREST​ or GL_NEAREST_MIPMAP​ for the specified internal format.

The level of support for use of the resource as a source of texturing in the vertex, tessellation control, tessellation evaluation, geometry, fragment and compute shader stages, respectively. params​ may be set to GL_FULL_SUPPORT​, GL_CAVEAT_SUPPORT​ or GL_NONE​ to indicate full support, limited support or no support at all, respectively.

GL_TEXTURE_SHADOW​, GL_TEXTURE_GATHER​ or GL_TEXTURE_GATHER_SHADOW​

The level of support for using the resource with a shadow sampler, in gather operations or as a shadow sampler in gather operations, respectively. Returned values may be GL_FULL_SUPPORT​, GL_CAVEAT_SUPPORT​ or GL_NONE​ to indicate full support, limited support or no support at all, respectively.

The level of support for image loads, stores and atomics for resources of the specified internal format. Returned values may be GL_FULL_SUPPORT​, GL_CAVEAT_SUPPORT​ or GL_NONE​ to indicate full support, limited support or no support at all, respectively.

GL_IMAGE_TEXEL_SIZE​

The size of a texel when the resource when used as an image texture. If the resource is not supported for image textures zero is returned.

GL_IMAGE_COMPATIBILITY_CLASS​

The compatibility class of the resource when used as an image texture. The possible values returned are GL_IMAGE_CLASS_4_X_32​, GL_IMAGE_CLASS_2_X_32​, GL_IMAGE_CLASS_1_X_32​, GL_IMAGE_CLASS_4_X_16​, GL_IMAGE_CLASS_2_X_16​, GL_IMAGE_CLASS_1_X_16​, GL_IMAGE_CLASS_4_X_8​, GL_IMAGE_CLASS_2_X_8​, GL_IMAGE_CLASS_1_X_8​, GL_IMAGE_CLASS_11_11_10​, and GL_IMAGE_CLASS_10_10_10_2​, which correspond to the 4x32, 2x32, 1x32, 4x16, 2x16, 1x16, 4x8, 2x8, 1x8, the class (a) 11/11/10 packed floating-point format, and the class (b) 10/10/10/2 packed formats, respectively. If the resource is not supported for image textures, GL_NONE​ is returned.

GL_IMAGE_PIXEL_FORMAT​ or GL_IMAGE_PIXEL_TYPE​

The pixel format or type of the resource respectively when used as an image texture. In either case, if the resource is not supported for image textures, GL_NONE​ is returned.

GL_IMAGE_FORMAT_COMPATIBILITY_TYPE​

The matching criteria use for the resource when used as an image textures. Possible values are GL_IMAGE_FORMAT_COMPATIBILITY_BY_SIZE​ or GL_IMAGE_FORMAT_COMPATIBILITY_BY_CLASS​. If the resource is not supported for image textures, GL_NONE​ is returned.

GL_SIMULTANEOUS_TEXTURE_AND_DEPTH_TEST​ or GL_SIMULTANEOUS_TEXTURE_AND_STENCIL_TEST​

Support for using the resource both as a source for texture sampling while it is bound as a buffer for depth or stencil test, respectively. Possible values returned are GL_FULL_SUPPORT​, GL_CAVEAT_SUPPORT​, or GL_NONE​ to indicate full support, limited support or no support at all. If the resource or operation is not supported, GL_NONE​ is returned.

GL_SIMULTANEOUS_TEXTURE_AND_DEPTH_WRITE​ or GL_SIMULTANEOUS_TEXTURE_AND_STENCIL_WRITE​

Support for using the resource both as a source for texture sampling while performing depth or stencil writes to the resources, respectively. Possible values returned are GL_FULL_SUPPORT​, GL_CAVEAT_SUPPORT​, or GL_NONE​ to indicate full support, limited support or no support at all. If the resource or operation is not supported, GL_NONE​ is returned.

GL_TEXTURE_COMPRESSED​

GL_TRUE​ if internalformat​ is a compressed internal format. GL_FALSE​ otherwise.

The width, height or total size, respectively of a block (in basic machine units). If the internal format is not compressed, or the resource is not supported, 0 is returned.

GL_CLEAR_BUFFER​

The level of support for using the resource with glClearBufferData​ and glClearBufferSubData​. Possible values returned are GL_FULL_SUPPORT​, GL_CAVEAT_SUPPORT​, or GL_NONE​ to indicate full support, limited support or no support at all, respectively. If the resource or operation is not supported, GL_NONE​ is returned.

GL_TEXTURE_VIEW​

The level of support for using the resource with the glTextureView​ command. Possible values returned are GL_FULL_SUPPORT​, GL_CAVEAT_SUPPORT​, or GL_NONE​ to indicate full support, limited support or no support at all, respectively. If the resource or operation is not supported, GL_NONE​ is returned.

GL_VIEW_COMPATIBILITY_CLASS​

the compatibility class of the resource when used as a texture view. The possible values returned are GL_VIEW_CLASS_128_BITS​, GL_VIEW_CLASS_96_BITS​, GL_VIEW_CLASS_64_BITS​, GL_VIEW_CLASS_48_BITS​, GL_VIEW_CLASS_32_BITS​, GL_VIEW_CLASS_24_BITS​, GL_VIEW_CLASS_16_BITS​, GL_VIEW_CLASS_8_BITS​, GL_VIEW_CLASS_S3TC_DXT1_RGB​, GL_VIEW_CLASS_S3TC_DXT1_RGBA​, GL_VIEW_CLASS_S3TC_DXT3_RGBA​, GL_VIEW_CLASS_S3TC_DXT5_RGBA​, GL_VIEW_CLASS_RGTC1_RED​, GL_VIEW_CLASS_RGTC2_RG​, GL_VIEW_CLASS_BPTC_UNORM​, and GL_VIEW_CLASS_BPTC_FLOAT​.

If pname​ is GL_CLEAR_TEXTURE​ then the presence of support for using the glClearTexImage​ and glClearTexSubImage​ commands with the resource is written to params​. Possible values written are GL_FULL_SUPPORT​, GL_CAVEAT_SUPPORT​, or GL_NONE​ to indicate full support, limited support or no support at all, respectively. If the resource or operation is not supported, GL_NONE​ is returned.

Notes

glGetInternalformativ is available only if the GL version is 4.2 or higher.