Path: blob/main_old/extensions/ANGLE_get_tex_level_parameter.txt
1693 views
Name12ANGLE_get_tex_level_parameter34Name Strings56GL_ANGLE_get_tex_level_parameter78Contributors910Geoff Lang, Google1112Contact1314Geoff Lang (geofflang 'at' google.com)1516Status1718Incomplete1920Version2122Last Modified Date: Oct 12, 202023Author Revision: 12425Number2627OpenGL ES Extension XX2829Dependencies3031OpenGL ES 2.0 is required.3233This extension is written against the OpenGL ES 3.0.5 specification.3435Overview3637This extension allows the user to query information about specific texture38levels exposed later in OpenGL ES 3.1.3940IP Status4142No known IP claims.4344New Procedures and Functions4546void GetTexLevelParameter{if}vANGLE(enum target, int level,47enum pname, T *params );4849New Tokens5051Accepted by the <pname> parameter of GetTexLevelParameter{if}vANGLE:5253TEXTURE_WIDTH 0x100054TEXTURE_HEIGHT 0x100155TEXTURE_DEPTH 0x807156TEXTURE_INTERNAL_FORMAT 0x100357TEXTURE_RED_SIZE 0x805C58TEXTURE_GREEN_SIZE 0x805D59TEXTURE_BLUE_SIZE 0x805E60TEXTURE_ALPHA_SIZE 0x805F61TEXTURE_DEPTH_SIZE 0x884A62TEXTURE_STENCIL_SIZE 0x88F163TEXTURE_SHARED_SIZE 0x8C3F64TEXTURE_RED_TYPE 0x8C1065TEXTURE_GREEN_TYPE 0x8C1166TEXTURE_BLUE_TYPE 0x8C1267TEXTURE_ALPHA_TYPE 0x8C1368TEXTURE_DEPTH_TYPE 0x8C1669TEXTURE_COMPRESSED 0x86A17071Additions to Chapter 6 of the OpenGL ES 3.0.5 Specification (State and State72Requests)7374Modify Section 6.1.4 "Texture Queries":7576(Add the following text to the end of the section)7778The commands7980void GetTexLevelParameter{if}vANGLE(enum target, int level,81enum pname, T *params );8283place information about texture image parameter <pname> for level-of-detail84<level> of the specified target into <params>. <pname> must be one of the85symbolic values in table 6.11.8687<target> may be one of TEXTURE_2D or one of the cube map face targets from88table 3.18, indicating the two-dimensional texture or one of the six distinct892D images making up the cube map texture object. Otherwise an INVALID_ENUM is90generated.9192<level> determines which level-of-detail's state is returned. If <level>93is negative or larger than the maximum allowable level-of-detail, then an94INVALID_VALUE error is generated.9596Note that TEXTURE_CUBE_MAP is not a valid <target> parameter for97GetTexLevelParameter{if}vANGLE, because it does not specify a particular98cube map face.99100For texture images with uncompressed internal formats, queries of101<pname> TEXTURE_RED_TYPE, TEXTURE_GREEN_TYPE, TEXTURE_BLUE_TYPE,102TEXTURE_ALPHA_TYPE, and TEXTURE_DEPTH_TYPE return the data type used103to store the component. Types NONE, SIGNED_NORMALIZED, UNSIGNED_-104NORMALIZED, FLOAT, INT, and UNSIGNED_INT respectively indicate missing,105signed normalized fixed-point, unsigned normalized fixed-point,106floating-point, signed unnormalized integer, and unsigned unnormalized107integer components. Queries of <pname> TEXTURE_RED_SIZE, TEXTURE_GREEN_SIZE,108TEXTURE_BLUE_SIZE, TEXTURE_ALPHA_SIZE, TEXTURE_DEPTH_SIZE,109TEXTURE_STENCIL_SIZE, and TEXTURE_SHARED_SIZE return the actual resolutions110of the stored image components, not the resolutions specified when the image111was defined. Invalid <pname> generate an INVALID_ENUM error.112113For texture images with compressed internal formats, the types returned114specify how components are interpreted after decompression, while the115resolutions returned specify the component resolution of an uncompressed116internal format that produces an image of roughly the same quality as the117compressed image in question. Since the quality of the implementation's118compression algorithm is likely data-dependent, the returned component sizes119should be treated only as rough approximations.120121Queries of <pname> TEXTURE_INTERNAL_FORMAT, TEXTURE_WIDTH, TEXTURE_HEIGHT,122and TEXTURE_DEPTH return the internal format, width, height, and depth,123respectively, as specified when the image array was created.124125Errors126127The error INVALID_ENUM is generated by GetTexLevelParameter{if}vANGLE128if <target> is not one of TEXTURE_2D, TEXTURE_3D, TEXTURE_2D_ARRAY, one of129the cube map face targets from table 3.18, or TEXTURE_2D_MULTISAMPLE_ANGLE.130131The error INVALID_VALUE is generated by GetTexLevelParameter{if}vANGLE132if <level> is negative or larger than the maximum allowable level-of-detail.133134The error INVALID_ENUM is generated by GetTexLevelParameter{if}vANGLE135if <value> is not one of TEXTURE_RED_TYPE, TEXTURE_GREEN_TYPE,136TEXTURE_BLUE_TYPE, TEXTURE_ALPHA_TYPE, TEXTURE_DEPTH_TYPE,137TEXTURE_DEPTH_SIZE, TEXTURE_STENCIL_SIZE, TEXTURE_SHARED_SIZE,138TEXTURE_WIDTH, TEXTURE_HEIGHT, TEXTURE_DEPTH, TEXTURE_INTERNAL_FORMAT,139TEXTURE_RED_SIZE, TEXTURE_GREEN_SIZE, TEXTURE_BLUE_SIZE, TEXTURE_ALPHA_SIZE,140or TEXTURE_COMPRESSED.141142New State143144(add new table 6.10, Textures (state per texture image), renumber subsequent tables)145146Initial147Get Value Type Get Command Value Description Sec.148---------------------- ---- ------------------- ------ --------------------------- ------149TEXTURE_WIDTH Z+ GetTexLevelParameterANGLE 0 Specified width 3.8150TEXTURE_HEIGHT Z+ GetTexLevelParameterANGLE 0 Specified height (2D/3D) 3.8151TEXTURE_DEPTH Z+ GetTexLevelParameterANGLE 0 Specified depth (3D) 3.8152TEXTURE_INTERNAL_FORMAT E GetTexLevelParameterANGLE RGBA Internal format 3.8153or R8 (see section 3.8.14)154TEXTURE_x_SIZE 6xZ+ GetTexLevelParameterANGLE 0 Component resolution (x is 3.8155RED, GREEN, BLUE, ALPHA,156DEPTH, or STENCIL)157TEXTURE_SHARED_SIZE Z+ GetTexLevelParameterANGLE 0 Shared exponent field 3.8158resolution159TEXTURE_x_TYPE E GetTexLevelParameterANGLE NONE Component type (x is RED, 6.1.4160GREEN, BLUE, ALPHA, or161DEPTH)162TEXTURE_COMPRESSED B GetTexLevelParameterANGLE FALSE True if image has a 3.8.6163compressed internal format164165Issues166None167168Revision History169170Rev. Date Author Changes171---- -------- ---------- --------------------------------------------1721 14/10/20 Geoff Lang First revision. Adapted from OpenGL ES173specification 3.1.174175176