Commit | Line | Data |
---|---|---|
7faf1d71 AW |
1 | <?xml version="1.0" encoding="UTF-8"?> |
2 | <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook MathML Module V1.1b1//EN" | |
3 | "http://www.oasis-open.org/docbook/xml/mathml/1.1CR1/dbmathml.dtd"> | |
4 | <refentry id="glGetInternalFormativ"> | |
5 | <refmeta> | |
6 | <refmetainfo> | |
7 | <copyright> | |
8 | <year>2011</year> | |
9 | <holder>Khronos Group.</holder> | |
10 | </copyright> | |
11 | </refmetainfo> | |
12 | <refentrytitle>glGetInternalFormativ</refentrytitle> | |
13 | <manvolnum>3G</manvolnum> | |
14 | </refmeta> | |
15 | <refnamediv> | |
16 | <refname>glGetInternalFormativ</refname> | |
17 | <refpurpose>retrieve information about implementation-dependent support for internal formats</refpurpose> | |
18 | </refnamediv> | |
19 | <refsynopsisdiv><title>C Specification</title> | |
20 | <funcsynopsis> | |
21 | <funcprototype> | |
22 | <funcdef>void <function>glGetInternalFormativ</function></funcdef> | |
23 | <paramdef>GLenum <parameter>target</parameter></paramdef> | |
24 | <paramdef>GLenum <parameter>internalformat</parameter></paramdef> | |
25 | <paramdef>GLenum <parameter>pname</parameter></paramdef> | |
26 | <paramdef>GLsizei <parameter>bufSize</parameter></paramdef> | |
27 | <paramdef>GLint *<parameter>params</parameter></paramdef> | |
28 | </funcprototype> | |
29 | <funcprototype> | |
30 | <funcdef>void <function>glGetInternalFormati64v</function></funcdef> | |
31 | <paramdef>GLenum <parameter>target</parameter></paramdef> | |
32 | <paramdef>GLenum <parameter>internalformat</parameter></paramdef> | |
33 | <paramdef>GLenum <parameter>pname</parameter></paramdef> | |
34 | <paramdef>GLsizei <parameter>bufSize</parameter></paramdef> | |
35 | <paramdef>GLint64 *<parameter>params</parameter></paramdef> | |
36 | </funcprototype> | |
37 | </funcsynopsis> | |
38 | </refsynopsisdiv> | |
39 | <!-- eqn: ignoring delim $$ --> | |
40 | <refsect1 id="parameters"><title>Parameters</title> | |
41 | <variablelist> | |
42 | <varlistentry> | |
43 | <term><parameter>target</parameter></term> | |
44 | <listitem> | |
45 | <para> | |
46 | Indicates the usage of the internal format. <parameter>target</parameter> must be <constant>GL_TEXTURE_1D</constant>, <constant>GL_TEXTURE_1D_ARRAY</constant>, | |
47 | <constant>GL_TEXTURE_2D</constant>, <constant>GL_TEXTURE_2D_ARRAY</constant>, <constant>GL_TEXTURE_3D</constant>, | |
48 | <constant>GL_TEXTURE_CUBE_MAP</constant>, <constant>GL_TEXTURE_CUBE_MAP_ARRAY</constant>, <constant>GL_TEXTURE_RECTANGLE</constant>, | |
49 | <constant>GL_TEXTURE_BUFFER</constant>, | |
50 | <constant>GL_RENDERBUFFER</constant>, <constant>GL_TEXTURE_2D_MULTISAMPLE</constant> or <constant>GL_TEXTURE_2D_MULTISAMPLE_ARRAY</constant>. | |
51 | </para> | |
52 | </listitem> | |
53 | </varlistentry> | |
54 | <varlistentry> | |
55 | <term><parameter>internalformat</parameter></term> | |
56 | <listitem> | |
57 | <para> | |
58 | Specifies the internal format about which to retrieve information. | |
59 | </para> | |
60 | </listitem> | |
61 | </varlistentry> | |
62 | <varlistentry> | |
63 | <term><parameter>pname</parameter></term> | |
64 | <listitem> | |
65 | <para> | |
66 | Specifies the type of information to query. | |
67 | </para> | |
68 | </listitem> | |
69 | </varlistentry> | |
70 | <varlistentry> | |
71 | <term><parameter>bufSize</parameter></term> | |
72 | <listitem> | |
73 | <para> | |
74 | Specifies the maximum number of basic machine units that may be written to <parameter>params</parameter> by the function. | |
75 | </para> | |
76 | </listitem> | |
77 | </varlistentry> | |
78 | <varlistentry> | |
79 | <term><parameter>params</parameter></term> | |
80 | <listitem> | |
81 | <para> | |
82 | Specifies the address of a variable into which to write the retrieved information. | |
83 | </para> | |
84 | </listitem> | |
85 | </varlistentry> | |
86 | </variablelist> | |
87 | </refsect1> | |
88 | <refsect1 id="description"><title>Description</title> | |
89 | <para> | |
90 | <function>glGetInternalFormativ</function> and <function>glGetInternalFormati64v</function> retrieve information about implementation-dependent support for | |
91 | internal formats. <parameter>target</parameter> indicates the target with which the internal format will | |
92 | be used and must be one of <constant>GL_RENDERBUFFER</constant>, <constant>GL_TEXTURE_2D_MULTISAMPLE</constant>, | |
93 | or <constant>GL_TEXTURE_2D_MULTISAMPLE_ARRAY</constant>, corresponding to usage as a renderbuffer, two-dimensional | |
94 | multisample texture or two-dimensional multisample array texture, respectively. | |
95 | </para> | |
96 | <para> | |
97 | <parameter>internalformat</parameter> specifies the internal format about which to retrieve information and | |
98 | must be a color-renderable, depth-renderable or stencil-renderable format. | |
99 | </para> | |
100 | <para> | |
101 | The information retrieved will be written to memory addressed by the pointer specified in <parameter>params</parameter>. No | |
102 | more than <parameter>bufSize</parameter> basic machine units will be written to this memory. | |
103 | </para> | |
104 | <para> | |
105 | If <parameter>pname</parameter> is <constant>GL_NUM_SAMPLE_COUNTS</constant>, the number of sample counts that would be | |
106 | returned by querying <constant>GL_SAMPLES</constant> will be returned in <parameter>params</parameter>. | |
107 | </para> | |
108 | <para> | |
109 | If <parameter>pname</parameter> is <constant>GL_SAMPLES</constant>, the sample counts supported for <parameter>internalformat</parameter> | |
110 | and <parameter>target</parameter> are written into <parameter>params</parameter> in descending numeric order. Only positive values are returned. | |
111 | Querying <constant>GL_SAMPLES</constant> with <parameter>bufSize</parameter> of one will return just the maximum supported number of | |
112 | samples for this format. The maximum value in <constant>GL_SAMPLES</constant> is guaranteed to be at least the lowest of the following: | |
113 | <itemizedlist> | |
114 | <listitem>The value of <constant>GL_MAX_INTEGER_SAMPLES</constant> if <parameter>internalformat</parameter> is a signed or unsigned integer format.</listitem> | |
115 | <listitem>The value of <constant>GL_MAX_DEPTH_TEXTURE_SAMPLES</constant> if <parameter>internalformat</parameter> is a depth- or stencil-renderable format and | |
116 | <parameter>target</parameter> is <constant>GL_TEXTURE_2D_MULTISAMPLE</constant>, <constant>GL_TEXTURE_2D_MULTISAMPLE_ARRAY</constant>.</listitem> | |
117 | <listitem>The value of <constant>GL_MAX_COLOR_TEXTURE_SAMPLES</constant> if <parameter>internalformat</parameter> is a color-renderable format and | |
118 | <parameter>target</parameter> is <constant>GL_TEXTURE_2D_MULTISAMPLE</constant> or <constant>GL_TEXTURE_2D_MULTISAMPLE_ARRAY</constant>.</listitem> | |
119 | <listitem>The value of <constant>GL_MAX_SAMPLES</constant>.</listitem> | |
120 | </itemizedlist> | |
121 | </para> | |
122 | <para> | |
123 | If <parameter>pname</parameter> is <constant>GL_INTERNALFORMAT_SUPPORTED</constant>, <parameter>params</parameter> is set to <constant>GL_TRUE</constant> if <parameter>internalFormat</parameter> | |
124 | is a supported internal format for <parameter>target</parameter> and to <constant>GL_FALSE</constant> otherwise. | |
125 | </para> | |
126 | <para> | |
127 | If <parameter>pname</parameter> is <constant>GL_INTERNALFORMAT_PREFERRED</constant>, <parameter>params</parameter> is set to <constant>GL_TRUE</constant> if <parameter>internalFormat</parameter> | |
128 | is an format for <parameter>target</parameter> that is preferred by the implementation and to <constant>GL_FALSE</constant> otherwise. | |
129 | </para> | |
130 | <para> | |
131 | If <parameter>pname</parameter> is <constant>GL_INTERNALFORMAT_RED_SIZE</constant>, <constant>GL_INTERNALFORMAT_GREEN_SIZE</constant>, | |
132 | <constant>GL_INTERNALFORMAT_BLUE_SIZE</constant>, <constant>GL_INTERNALFORMAT_ALPHA_SIZE</constant>, <constant>GL_INTERNALFORMAT_DEPTH_SIZE</constant>, | |
133 | <constant>GL_INTERNALFORMAT_STENCIL_SIZE</constant>, or <constant>GL_INTERNALFORMAT_SHARED_SIZE</constant> then | |
134 | <parameter>params</parameter> is set to the actual resolutions that would be used for storing image array components | |
135 | for the resource for the red, green, blue, alpha, depth, stencil and shared channels respectively. If <parameter>internalFormat</parameter> | |
136 | is a compressed internal format, then <parameter>params</parameter> is set to the component resolution of an uncompressed internal format that produces | |
137 | an image of roughly the same quality as the compressed algorithm. If the internal format is unsupported, or if a particular component is | |
138 | not present in the format, 0 is written to <parameter>params</parameter>. | |
139 | </para> | |
140 | <para> | |
141 | If <parameter>pname</parameter> is <constant>GL_INTERNALFORMAT_RED_TYPE</constant>, <constant>GL_INTERNALFORMAT_GREEN_TYPE</constant>, | |
142 | <constant>GL_INTERNALFORMAT_BLUE_TYPE</constant>, <constant>GL_INTERNALFORMAT_ALPHA_TYPE</constant>, <constant>GL_INTERNALFORMAT_DEPTH_TYPE</constant>, | |
143 | or <constant>GL_INTERNALFORMAT_STENCIL_TYPE</constant> then <parameter>params</parameter> is set to a token identifying the data type used | |
144 | to store the respective component. If the <parameter>internalFormat</parameter> represents a compressed internal format then | |
145 | the types returned specify how components are interpreted after decompression. | |
146 | </para> | |
147 | <para> | |
148 | If <parameter>pname</parameter> is <constant>GL_MAX_WIDTH</constant>, <constant>GL_MAX_HEIGHT</constant>, <constant>GL_MAX_DEPTH</constant>, | |
149 | or <constant>GL_MAX_LAYERS</constant> then <parameter>pname</parameter> is filled with the maximum width, height, depth or layer count | |
150 | for textures with internal format <parameter>internalFormat</parameter>, respectively. If <parameter>pname</parameter> is <constant>GL_MAX_COMBINED_DIMENSIONS</constant> | |
151 | then <parameter>pname</parameter> is filled with the maximum combined dimensions of a texture of the specified internal format. | |
152 | </para> | |
153 | <para> | |
154 | If <parameter>pname</parameter> is <constant>GL_COLOR_COMPONENTS</constant> then <parameter>params</parameter> is set to the value <constant>GL_TRUE</constant> | |
155 | if the internal format contains any color component (i.e., red, green, blue or alpha) and to <constant>GL_FALSE</constant> otherwise. If | |
156 | <parameter>pname</parameter> is <constant>GL_DEPTH_COMPONENTS</constant> or <constant>GL_STENCIL_COMPONENTS</constant> then <parameter>params</parameter> | |
157 | is set to <constant>GL_TRUE</constant> if the internal format contains a depth or stencil component, respectively, and to <constant>GL_FALSE</constant> | |
158 | otherwise. | |
159 | </para> | |
160 | <para> | |
161 | If <parameter>pname</parameter> is <constant>GL_COLOR_RENDERABLE</constant>, <constant>GL_DEPTH_RENDERABLE</constant> or <constant>GL_STENCIL_RENDERABLE</constant> | |
162 | then <parameter>params</parameter> is set to <constant>GL_TRUE</constant> if the specified internal format is color, depth or stencil renderable, respectively, | |
163 | and to <constant>GL_FALSE</constant> otherwise. | |
164 | </para> | |
165 | <para> | |
166 | If <parameter>pname</parameter> is <constant>GL_FRAMEBUFFER_RENDERABLE</constant> or <constant>GL_FRAMEBUFFER_RENDERABLE_LAYERED</constant> | |
167 | then <parameter>params</parameter> is set to one of <constant>GL_FULL_SUPPORT</constant>, | |
168 | <constant>GL_CAVEAT_SUPPORT</constant> or <constant>GL_NONE</constant> to indicate that framebuffer attachments (layered attachments in the | |
169 | case of <constant>GL_FRAMEBUFFER_RENDERABLE_LAYERED</constant>) with that internal format are either | |
170 | renderable with no restrictions, renderable with some restrictions or not renderable at all. | |
171 | </para> | |
172 | <para> | |
173 | If <parameter>pname</parameter> is <constant>GL_FRAMEBUFFER_BLEND</constant>, <parameter>params</parameter> is set to <constant>GL_TRUE</constant> | |
174 | to indicate that the internal format is supported for blending operations when attached to a framebuffer, and to <constant>GL_FALSE</constant> otherwise. | |
175 | </para> | |
176 | <para> | |
177 | If <parameter>pname</parameter> is <constant>GL_READ_PIXELS</constant> then <parameter>params</parameter> is set to <constant>GL_FULL_SUPPORT</constant>, | |
178 | <constant>GL_CAVEAT_SUPPORT</constant> or <constant>GL_NONE</constant> to that either full support, limited support or no support at all is supplied | |
179 | for reading pixels from framebuffer attachments in the specified internal format. | |
180 | </para> | |
181 | <para> | |
182 | If <parameter>pname</parameter> is <constant>GL_READ_PIXELS_FORMAT</constant> or <constant>GL_READ_PIXELS_TYPE</constant> then <parameter>params</parameter> | |
183 | is filled with the format or type, respectively, most recommended to obtain the highest image quality and performance. For | |
184 | <constant>GL_READ_PIXELS_FORMAT</constant>, the value returned in <parameter>params</parameter> is a token that is accepted for | |
185 | the <parameter>format</parameter> argument to <citerefentry><refentrytitle>glReadPixels</refentrytitle></citerefentry>. For | |
186 | <constant>GL_READ_PIXELS_TYPE</constant>, the value returned in <parameter>params</parameter> is a token that is accepted for | |
187 | the <parameter>type</parameter> argument to <citerefentry><refentrytitle>glReadPixels</refentrytitle></citerefentry>. | |
188 | </para> | |
189 | <para> | |
190 | If <parameter>pname</parameter> is <constant>GL_TEXTURE_IMAGE_FORMAT</constant> or <constant>GL_TEXTURE_IMAGE_TYPE</constant> then | |
191 | <parameter>params</parameter> is filled with the implementation-recommended format or type to be used in calls to | |
192 | <citerefentry><refentrytitle>glTexImage2D</refentrytitle></citerefentry> and other similar functions. For <constant>GL_TEXTURE_IMAGE_FORMAT</constant>, | |
193 | <parameter>params</parameter> is filled with a token suitable for use as the <parameter>format</parameter> argument to | |
194 | <citerefentry><refentrytitle>glTexImage2D</refentrytitle></citerefentry>. For <constant>GL_TEXTURE_IMAGE_TYPE</constant>, | |
195 | <parameter>params</parameter> is filled with a token suitable for use as the <parameter>type</parameter> argument to | |
196 | <citerefentry><refentrytitle>glTexImage2D</refentrytitle></citerefentry>. | |
197 | </para> | |
198 | <para> | |
199 | If <parameter>pname</parameter> is <constant>GL_GET_TEXTURE_IMAGE_FORMAT</constant> or <constant>GL_GET_TEXTURE_IMAGE_TYPE</constant> then | |
200 | <parameter>params</parameter> is filled with the implementation-recommended format or type to be used in calls to | |
201 | <citerefentry><refentrytitle>glGetTexImage2D</refentrytitle></citerefentry> and other similar functions. For <constant>GL_GET_TEXTURE_IMAGE_FORMAT</constant>, | |
202 | <parameter>params</parameter> is filled with a token suitable for use as the <parameter>format</parameter> argument to | |
203 | <citerefentry><refentrytitle>glGetTexImage2D</refentrytitle></citerefentry>. For <constant>GL_GET_TEXTURE_IMAGE_TYPE</constant>, | |
204 | <parameter>params</parameter> is filled with a token suitable for use as the <parameter>type</parameter> argument to | |
205 | <citerefentry><refentrytitle>glGetTexImage2D</refentrytitle></citerefentry>. | |
206 | </para> | |
207 | <para> | |
208 | If <parameter>pname</parameter> is <constant>GL_MIPMAP</constant> then <parameter>pname</parameter> is set to <constant>GL_TRUE</constant> | |
209 | to indicate that the specified internal format supports mipmaps and to <constant>GL_FALSE</constant> otherwise. | |
210 | </para> | |
211 | <para> | |
212 | If <parameter>pname</parameter> is <constant>GL_GENERATE_MIPMAP</constant> or <constant>GL_AUTO_GENERATE_MIPMAP</constant> then <parameter>params</parameter> | |
213 | is indicates the level of support for manual or automatic mipmap generation for the specified internal format, respectively. Returned values | |
214 | may be one of <constant>GL_FULL_SUPPORT</constant>, <constant>GL_CAVEAT_SUPPORT</constant> and <constant>GL_NONE</constant> to indicate | |
215 | either full support, limited support or no support at all. | |
216 | </para> | |
217 | <para> | |
218 | If <parameter>pname</parameter> is <constant>GL_COLOR_ENCODING</constant> then the color encoding for the resource is returned in | |
219 | <parameter>params</parameter>. Possible values for color buffers are <constant>GL_LINEAR</constant> or <constant>GL_SRGB</constant>, | |
220 | for linear or sRGB-encoded color components, respectively. For non-color | |
221 | formats (such as depth or stencil), or for unsupported resources, | |
222 | the value <constant>GL_NONE</constant> is returned. | |
223 | </para> | |
224 | <para> | |
225 | If <parameter>pname</parameter> is <constant>GL_SRGB_READ</constant>, or <constant>GL_SRGB_WRITE</constant> then <parameter>params</parameter> | |
226 | indicates the level of support for reading and writing to sRGB encoded images, respectively. For <constant>GL_SRGB_READ</constant>, | |
227 | support for converting from sRGB colorspace on read operations is returned in <parameter>params</parameter> and for <constant>GL_SRGB_WRITE</constant>, | |
228 | support for converting to sRGB colorspace on write operations to the resource is returned in <parameter>params</parameter>. <parameter>params</parameter> may be | |
229 | set to <constant>GL_FULL_SUPPORT</constant>, <constant>GL_CAVEAT_SUPPORT</constant>, or <constant>GL_NONE</constant> to indicate | |
230 | full support, limited support or no support at all, respecitively. | |
231 | </para> | |
232 | <para> | |
233 | If <parameter>pname</parameter> is <constant>GL_FILTER</constant> the <parameter>params</parameter> is set to either <constant>GL_TRUE</constant> | |
234 | or <constant>GL_FALSE</constant> to indicate support or lack thereof for filter modes other than <constant>GL_NEAREST</constant> or <constant>GL_NEAREST_MIPMAP</constant> | |
235 | for the specified internal format. | |
236 | </para> | |
237 | <para> | |
238 | If <parameter>pname</parameter> is <constant>GL_VERTEX_TEXTURE</constant>, <constant>GL_TESS_CONTROL_TEXTURE</constant>, <constant>GL_TESS_EVALUATION_TEXTURE</constant>, | |
239 | <constant>GL_GEOMETRY_TEXTURE</constant>, <constant>GL_FRAGMENT_TEXTURE</constant>, or <constant>GL_COMPUTE_TEXTURE</constant>, then the value | |
240 | written to <parameter>params</parameter> indicates support for use of the resource as a source of texturing in the vertex, tessellation control, | |
241 | tessellation evaluation, geometry, fragment and compute shader stages, respectively. <parameter>params</parameter> may be set to | |
242 | <constant>GL_FULL_SUPPORT</constant>, <constant>GL_CAVEAT_SUPPORT</constant> or <constant>GL_NONE</constant> to indicate full support, | |
243 | limited support or no support at all, respectively. | |
244 | </para> | |
245 | <para> | |
246 | If <parameter>pname</parameter> is <constant>GL_TEXTURE_SHADOW</constant>, <constant>GL_TEXTURE_GATHER</constant> or <constant>GL_TEXTURE_GATHER_SHADOW</constant> then the value written to | |
247 | <parameter>params</parameter> indicates 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 | |
248 | may be <constant>GL_FULL_SUPPORT</constant>, <constant>GL_CAVEAT_SUPPORT</constant> or <constant>GL_NONE</constant> to indicate full support, | |
249 | limited support or no support at all, respectively. | |
250 | </para> | |
251 | <para> | |
252 | If <parameter>pname</parameter> is <constant>GL_SHADER_IMAGE_LOAD</constant>, <constant>GL_SHADER_IMAGE_STORE</constant> or <constant>GL_SHADER_IMAGE_ATOMIC</constant> | |
253 | then the value returned in <parameter>params</parameter> indicates the level of support for image loads, stores and atomics for resources of the specified internal | |
254 | format. Returned values | |
255 | may be <constant>GL_FULL_SUPPORT</constant>, <constant>GL_CAVEAT_SUPPORT</constant> or <constant>GL_NONE</constant> to indicate full support, | |
256 | limited support or no support at all, respectively. | |
257 | </para> | |
258 | <para> | |
259 | If <parameter>pname</parameter> is <constant>GL_IMAGE_TEXEL_SIZE</constant> then the size of a texel when the resource when used as | |
260 | an image texture is returned in <parameter>params</parameter>. If the resource is not supported for image | |
261 | textures zero is returned. | |
262 | </para> | |
263 | <para> | |
264 | If <parameter>pname</parameter> is <constant>GL_IMAGE_COMPATIBILITY_CLASS</constant> then the compatibility class of the resource when | |
265 | used as an image texture is returned in <parameter>params</parameter>. The possible values | |
266 | returned are <constant>GL_IMAGE_CLASS_4_X_32</constant>, <constant>GL_IMAGE_CLASS_2_X_32</constant>, <constant>GL_IMAGE_CLASS_1_X_32</constant>, | |
267 | <constant>GL_IMAGE_CLASS_4_X_16</constant>, <constant>GL_IMAGE_CLASS_2_X_16</constant>, <constant>GL_IMAGE_CLASS_1_X_16</constant>, | |
268 | <constant>GL_IMAGE_CLASS_4_X_8</constant>, <constant>GL_IMAGE_CLASS_2_X_8</constant>, <constant>GL_IMAGE_CLASS_1_X_8</constant>, | |
269 | <constant>GL_IMAGE_CLASS_11_11_10</constant>, and <constant>GL_IMAGE_CLASS_10_10_10_2</constant>, which correspond to | |
270 | the 4x32, 2x32, 1x32, 4x16, 2x16, 1x16, 4x8, 2x8, 1x8, the class | |
271 | (a) 11/11/10 packed floating-point format, and the class (b) | |
272 | 10/10/10/2 packed formats, respectively. | |
273 | If the resource is not supported for image textures, <constant>GL_NONE</constant> is returned. | |
274 | </para> | |
275 | <para> | |
276 | If <parameter>pname</parameter> is <constant>GL_IMAGE_PIXEL_FORMAT</constant> or <constant>GL_IMAGE_PIXEL_TYPE</constant> then | |
277 | the pixel format or type of the resource when used as an image texture is returned in <parameter>params</parameter>, respectively. | |
278 | In either case, the resource is not supported for image textures <constant>GL_NONE</constant> is returned. | |
279 | </para> | |
280 | <para> | |
281 | If <parameter>pname</parameter> is <constant>GL_IMAGE_FORMAT_COMPATIBILITY_TYPE</constant>, the matching criteria use for the | |
282 | resource when used as an image textures is returned in <parameter>params</parameter>. Possible values returned in <parameter>params</parameter> are | |
283 | <constant>GL_IMAGE_FORMAT_COMPATIBILITY_BY_SIZE</constant> or <constant>GL_IMAGE_FORMAT_COMPATIBILITY_BY_CLASS</constant>. | |
284 | If the resource is not supported for image textures, <constant>GL_NONE</constant> is returned. | |
285 | </para> | |
286 | <para> | |
287 | If <parameter>pname</parameter> is <constant>GL_SIMULTANEOUS_TEXTURE_AND_DEPTH_TEST</constant> or <constant>GL_SIMULTANEOUS_TEXTURE_AND_STENCIL_TEST</constant>, | |
288 | 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, is written to <parameter>params</parameter>. | |
289 | Possible values returned are <constant>GL_FULL_SUPPORT</constant>, <constant>GL_CAVEAT_SUPPORT</constant>, or <constant>GL_NONE</constant> to indicate | |
290 | full support, limited support or no support at all. If the resource or operation is not supported, <constant>GL_NONE</constant> is returned. | |
291 | </para> | |
292 | <para> | |
293 | If <parameter>pname</parameter> is <constant>GL_SIMULTANEOUS_TEXTURE_AND_DEPTH_WRITE</constant> or <constant>GL_SIMULTANEOUS_TEXTURE_AND_STENCIL_WRITE</constant>, | |
294 | support for using the resource both as a source for texture sampling while performing depth or stencil writes to the resources, respectively, is written to <parameter>params</parameter>. | |
295 | Possible values returned are <constant>GL_FULL_SUPPORT</constant>, <constant>GL_CAVEAT_SUPPORT</constant>, or <constant>GL_NONE</constant> to indicate | |
296 | full support, limited support or no support at all. If the resource or operation is not supported, <constant>GL_NONE</constant> is returned. | |
297 | </para> | |
298 | <para> | |
299 | If <parameter>pname</parameter> is <constant>GL_TEXTURE_COMPRESSED</constant> then <constant>GL_TRUE</constant> is returned in <parameter>params</parameter> | |
300 | if <parameter>internalformat</parameter> is a compressed internal format. <constant>GL_FALSE</constant> is returned in <parameter>params</parameter> | |
301 | otherwise. | |
302 | </para> | |
303 | <para> | |
304 | If <parameter>pname</parameter> is <constant>GL_TEXTURE_COMPRESSED_BLOCK_WIDTH</constant>, <constant>GL_TEXTURE_COMPRESSED_BLOCK_HEIGHT</constant> or | |
305 | <constant>GL_TEXTURE_COMPRESSED_BLOCK_SIZE</constant> then the width, height or total size, respectively of a block (in basic machine units) is returned in | |
306 | <parameter>params</parameter>. If the internal format is not compressed, or the resource is not supported, 0 is returned. | |
307 | </para> | |
308 | <para> | |
309 | If <parameter>pname</parameter> is <constant>GL_CLEAR_BUFFER</constant>, the level of support for using the resource with <citerefentry><refentrytitle>glClearBufferData</refentrytitle></citerefentry> | |
310 | and <citerefentry><refentrytitle>glClearBufferSubData</refentrytitle></citerefentry> is returned in <parameter>params</parameter>. Possible values returned are <constant>GL_FULL_SUPPORT</constant>, | |
311 | <constant>GL_CAVEAT_SUPPORT</constant>, or <constant>GL_NONE</constant> to indicate | |
312 | full support, limited support or no support at all, respectively. If the resource or operation is not supported, <constant>GL_NONE</constant> is returned. | |
313 | </para> | |
314 | <para> | |
315 | If <parameter>pname</parameter> is <constant>GL_TEXTURE_VIEW</constant>, the level of support for using the resource with the <citerefentry><refentrytitle>glTextureView</refentrytitle></citerefentry> | |
316 | command is returned in <parameter>params</parameter>. Possible values returned are <constant>GL_FULL_SUPPORT</constant>, | |
317 | <constant>GL_CAVEAT_SUPPORT</constant>, or <constant>GL_NONE</constant> to indicate | |
318 | full support, limited support or no support at all, respectively. If the resource or operation is not supported, <constant>GL_NONE</constant> is returned. | |
319 | </para> | |
320 | <para> | |
321 | If <parameter>pname</parameter> is <constant>GL_VIEW_COMPATIBILITY_CLASS</constant> then the compatibility class of the resource when | |
322 | used as a texture view is returned in <parameter>params</parameter>. The possible values | |
323 | returned are <constant>GL_VIEW_CLASS_128_BITS</constant>, <constant>GL_VIEW_CLASS_96_BITS</constant>, | |
324 | <constant>GL_VIEW_CLASS_64_BITS</constant>, <constant>GL_VIEW_CLASS_48_BITS</constant>, <constant>GL_VIEW_CLASS_32_BITS</constant>, | |
325 | <constant>GL_VIEW_CLASS_24_BITS</constant>, <constant>GL_VIEW_CLASS_16_BITS</constant>, <constant>GL_VIEW_CLASS_8_BITS</constant>, | |
326 | <constant>GL_VIEW_CLASS_S3TC_DXT1_RGB</constant>, <constant>GL_VIEW_CLASS_S3TC_DXT1_RGBA</constant>, | |
327 | <constant>GL_VIEW_CLASS_S3TC_DXT3_RGBA</constant>, <constant>GL_VIEW_CLASS_S3TC_DXT5_RGBA</constant>, | |
328 | <constant>GL_VIEW_CLASS_RGTC1_RED</constant>, <constant>GL_VIEW_CLASS_RGTC2_RG</constant>, <constant>GL_VIEW_CLASS_BPTC_UNORM</constant>, and | |
329 | <constant>GL_VIEW_CLASS_BPTC_FLOAT</constant>. | |
330 | </para> | |
331 | </refsect1> | |
332 | <refsect1 id="notes"><title>Notes</title> | |
333 | <para> | |
334 | <function>glGetInternalFormativ</function> is available only if the | |
335 | GL version is 4.2 or higher. | |
336 | </para> | |
337 | <para> | |
338 | The tokens | |
339 | <constant>GL_INTERNALFORMAT_SUPPORTED</constant>, | |
340 | <constant>GL_INTERNALFORMAT_PREFERRED</constant>, | |
341 | <constant>GL_INTERNALFORMAT_RED_SIZE</constant>, | |
342 | <constant>GL_INTERNALFORMAT_GREEN_SIZE</constant>, | |
343 | <constant>GL_INTERNALFORMAT_BLUE_SIZE</constant>, | |
344 | <constant>GL_INTERNALFORMAT_ALPHA_SIZE</constant>, | |
345 | <constant>GL_INTERNALFORMAT_DEPTH_SIZE</constant>, | |
346 | <constant>GL_INTERNALFORMAT_STENCIL_SIZE</constant>, | |
347 | <constant>GL_INTERNALFORMAT_SHARED_SIZE</constant>, | |
348 | <constant>GL_INTERNALFORMAT_RED_TYPE</constant>, | |
349 | <constant>GL_INTERNALFORMAT_GREEN_TYPE</constant>, | |
350 | <constant>GL_INTERNALFORMAT_BLUE_TYPE</constant>, | |
351 | <constant>GL_INTERNALFORMAT_ALPHA_TYPE</constant>, | |
352 | <constant>GL_INTERNALFORMAT_DEPTH_TYPE</constant>, | |
353 | <constant>GL_INTERNALFORMAT_STENCIL_TYPE</constant>, | |
354 | <constant>GL_MAX_WIDTH</constant>, | |
355 | <constant>GL_MAX_HEIGHT</constant>, | |
356 | <constant>GL_MAX_DEPTH</constant>, | |
357 | <constant>GL_MAX_LAYERS</constant>, | |
358 | <constant>GL_MAX_COMBINED_DIMENSIONS</constant>, | |
359 | <constant>GL_COLOR_COMPONENTS</constant>, | |
360 | <constant>GL_DEPTH_COMPONENTS</constant>, | |
361 | <constant>GL_STENCIL_COMPONENTS</constant>, | |
362 | <constant>GL_COLOR_RENDERABLE</constant>, | |
363 | <constant>GL_DEPTH_RENDERABLE</constant>, | |
364 | <constant>GL_STENCIL_RENDERABLE</constant>, | |
365 | <constant>GL_FRAMEBUFFER_RENDERABLE</constant>, | |
366 | <constant>GL_FRAMEBUFFER_RENDERABLE_LAYERED</constant>, | |
367 | <constant>GL_FRAMEBUFFER_BLEND</constant>, | |
368 | <constant>GL_READ_PIXELS</constant>, | |
369 | <constant>GL_READ_PIXELS_FORMAT</constant>, | |
370 | <constant>GL_READ_PIXELS_TYPE</constant>, | |
371 | <constant>GL_TEXTURE_IMAGE_FORMAT</constant>, | |
372 | <constant>GL_TEXTURE_IMAGE_TYPE</constant>, | |
373 | <constant>GL_GET_TEXTURE_IMAGE_FORMAT</constant>, | |
374 | <constant>GL_GET_TEXTURE_IMAGE_TYPE</constant>, | |
375 | <constant>GL_MIPMAP</constant>, | |
376 | <constant>GL_GENERATE_MIPMAP</constant>, | |
377 | <constant>GL_AUTO_GENERATE_MIPMAP</constant>, | |
378 | <constant>GL_COLOR_ENCODING</constant>, | |
379 | <constant>GL_SRGB_READ</constant>, | |
380 | <constant>GL_SRGB_WRITE</constant>, | |
381 | <constant>GL_SRGB_DECODE_ARB</constant>, | |
382 | <constant>GL_FILTER</constant>, | |
383 | <constant>GL_VERTEX_TEXTURE</constant>, | |
384 | <constant>GL_TESS_CONTROL_TEXTURE</constant>, | |
385 | <constant>GL_TESS_EVALUATION_TEXTURE</constant>, | |
386 | <constant>GL_GEOMETRY_TEXTURE</constant>, | |
387 | <constant>GL_FRAGMENT_TEXTURE</constant>, | |
388 | <constant>GL_COMPUTE_TEXTURE</constant>, | |
389 | <constant>GL_TEXTURE_SHADOW</constant>, | |
390 | <constant>GL_TEXTURE_GATHER</constant>, | |
391 | <constant>GL_TEXTURE_GATHER_SHADOW</constant>, | |
392 | <constant>GL_SHADER_IMAGE_LOAD</constant>, | |
393 | <constant>GL_SHADER_IMAGE_STORE</constant>, | |
394 | <constant>GL_SHADER_IMAGE_ATOMIC</constant>, | |
395 | <constant>GL_IMAGE_TEXEL_SIZE</constant>, | |
396 | <constant>GL_IMAGE_COMPATIBILITY_CLASS</constant>, | |
397 | <constant>GL_IMAGE_PIXEL_FORMAT</constant>, | |
398 | <constant>GL_IMAGE_PIXEL_TYPE</constant>, | |
399 | <constant>GL_IMAGE_FORMAT_COMPATIBILITY_TYPE</constant>, | |
400 | <constant>GL_SIMULTANEOUS_TEXTURE_AND_DEPTH_TEST</constant>, | |
401 | <constant>GL_SIMULTANEOUS_TEXTURE_AND_STENCIL_TEST</constant>, | |
402 | <constant>GL_SIMULTANEOUS_TEXTURE_AND_DEPTH_WRITE</constant>, | |
403 | <constant>GL_SIMULTANEOUS_TEXTURE_AND_STENCIL_WRITE</constant>, | |
404 | <constant>GL_TEXTURE_COMPRESSED</constant>, | |
405 | <constant>GL_TEXTURE_COMPRESSED_BLOCK_WIDTH</constant>, | |
406 | <constant>GL_TEXTURE_COMPRESSED_BLOCK_HEIGHT</constant>, | |
407 | <constant>GL_TEXTURE_COMPRESSED_BLOCK_SIZE</constant>, | |
408 | <constant>GL_CLEAR_BUFFER</constant>, | |
409 | <constant>GL_TEXTURE_VIEW</constant>, and | |
410 | <constant>GL_VIEW_COMPATIBILITY_CLASS</constant> are supported only if the GL | |
411 | version is 4.3 or higher. | |
412 | </para> | |
413 | </refsect1> | |
414 | <refsect1 id="errors"><title>Errors</title> | |
415 | <para> | |
416 | <constant>GL_INVALID_VALUE</constant> is generated if <parameter>bufSize</parameter> is negative. | |
417 | </para> | |
418 | <para> | |
419 | <constant>GL_INVALID_ENUM</constant> is generated if <parameter>pname</parameter> is not <constant>GL_SAMPLES</constant> or <constant>GL_NUM_SAMPLE_COUNTS</constant>. | |
420 | </para> | |
421 | <para> | |
422 | <constant>GL_INVALID_ENUM</constant> is generated if <parameter>internalformat</parameter> is not color-, depth-, or stencil-renderable. | |
423 | </para> | |
424 | <para> | |
425 | <constant>GL_INVALID_ENUM</constant> is generated if <parameter>target</parameter> is not one of <constant>GL_TEXTURE_2D_MULTISAMPLE</constant>, | |
426 | <constant>GL_TEXTURE_2D_MULTISAMPLE_ARRAY</constant> or <constant>GL_RENDERBUFFER</constant>. | |
427 | </para> | |
428 | </refsect1> | |
429 | <refsect1 id="seealso"><title>See Also</title> | |
430 | <para> | |
431 | <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> | |
432 | </para> | |
433 | </refsect1> | |
434 | <refsect1 id="Copyright"><title>Copyright</title> | |
435 | <para> | |
436 | Copyright <trademark class="copyright"></trademark> 2011-2012 Khronos Group. | |
437 | This material may be distributed subject to the terms and conditions set forth in | |
438 | the Open Publication License, v 1.0, 8 June 1999. | |
439 | <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>. | |
440 | </para> | |
441 | </refsect1> | |
442 | </refentry> |