15bd8deadSopenharmony_ciName 25bd8deadSopenharmony_ci 35bd8deadSopenharmony_ci OES_texture_3D 45bd8deadSopenharmony_ci 55bd8deadSopenharmony_ciName Strings 65bd8deadSopenharmony_ci 75bd8deadSopenharmony_ci GL_OES_texture_3D 85bd8deadSopenharmony_ci 95bd8deadSopenharmony_ciContributors 105bd8deadSopenharmony_ci 115bd8deadSopenharmony_ci Benj Lipchak 125bd8deadSopenharmony_ci Robert Simpson 135bd8deadSopenharmony_ci 145bd8deadSopenharmony_ciContact 155bd8deadSopenharmony_ci 165bd8deadSopenharmony_ci Aaftab Munshi (amunshi@apple.com) 175bd8deadSopenharmony_ci 185bd8deadSopenharmony_ciNotice 195bd8deadSopenharmony_ci 205bd8deadSopenharmony_ci Copyright (c) 2005-2013 The Khronos Group Inc. Copyright terms at 215bd8deadSopenharmony_ci http://www.khronos.org/registry/speccopyright.html 225bd8deadSopenharmony_ci 235bd8deadSopenharmony_ciSpecification Update Policy 245bd8deadSopenharmony_ci 255bd8deadSopenharmony_ci Khronos-approved extension specifications are updated in response to 265bd8deadSopenharmony_ci issues and bugs prioritized by the Khronos OpenGL ES Working Group. For 275bd8deadSopenharmony_ci extensions which have been promoted to a core Specification, fixes will 285bd8deadSopenharmony_ci first appear in the latest version of that core Specification, and will 295bd8deadSopenharmony_ci eventually be backported to the extension document. This policy is 305bd8deadSopenharmony_ci described in more detail at 315bd8deadSopenharmony_ci https://www.khronos.org/registry/OpenGL/docs/update_policy.php 325bd8deadSopenharmony_ci 335bd8deadSopenharmony_ciIP Status 345bd8deadSopenharmony_ci 355bd8deadSopenharmony_ci None. 365bd8deadSopenharmony_ci 375bd8deadSopenharmony_ciStatus 385bd8deadSopenharmony_ci 395bd8deadSopenharmony_ci Ratified by the Khronos BOP, July 22, 2005. 405bd8deadSopenharmony_ci 415bd8deadSopenharmony_ciVersion 425bd8deadSopenharmony_ci 435bd8deadSopenharmony_ci Last Modifed Date: July 24, 2007 445bd8deadSopenharmony_ci 455bd8deadSopenharmony_ciNumber 465bd8deadSopenharmony_ci 475bd8deadSopenharmony_ci OpenGL ES Extension #34 485bd8deadSopenharmony_ci 495bd8deadSopenharmony_ciDependencies 505bd8deadSopenharmony_ci 515bd8deadSopenharmony_ci OpenGL ES 2.0 is required. 525bd8deadSopenharmony_ci 535bd8deadSopenharmony_ciOverview 545bd8deadSopenharmony_ci 555bd8deadSopenharmony_ci This extension adds support for 3D textures. The OpenGL ES 2.0 texture wrap 565bd8deadSopenharmony_ci modes and mip-mapping is supported for power of two 3D textures. Mip- 575bd8deadSopenharmony_ci mapping and texture wrap modes other than CLAMP_TO_EDGE are not supported 585bd8deadSopenharmony_ci for non-power of two 3D textures. 595bd8deadSopenharmony_ci 605bd8deadSopenharmony_ci The OES_texture_npot extension, if supported, will enable mip-mapping and 615bd8deadSopenharmony_ci other wrap modes for non-power of two 3D textures. 625bd8deadSopenharmony_ci 635bd8deadSopenharmony_ciIssues 645bd8deadSopenharmony_ci 655bd8deadSopenharmony_ci None. 665bd8deadSopenharmony_ci 675bd8deadSopenharmony_ciNew Tokens 685bd8deadSopenharmony_ci 695bd8deadSopenharmony_ci Accepted by the <target> parameter of TexImage3DOES, TexSubImage3DOES, 705bd8deadSopenharmony_ci CopyTexSubImage3DOES, CompressedTexImage3DOES and 715bd8deadSopenharmony_ci CompressedTexSubImage3DOES, GetTexParameteriv, and GetTexParameterfv: 725bd8deadSopenharmony_ci 735bd8deadSopenharmony_ci TEXTURE_3D_OES 0x806F 745bd8deadSopenharmony_ci 755bd8deadSopenharmony_ci Accepted by the <pname> parameter of TexParameteriv, TexParameterfv, 765bd8deadSopenharmony_ci GetTexParameteriv, and GetTexParameterfv: 775bd8deadSopenharmony_ci 785bd8deadSopenharmony_ci TEXTURE_WRAP_R_OES 0x8072 795bd8deadSopenharmony_ci 805bd8deadSopenharmony_ci Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, and 815bd8deadSopenharmony_ci GetFloatv: 825bd8deadSopenharmony_ci 835bd8deadSopenharmony_ci MAX_3D_TEXTURE_SIZE_OES 0x8073 845bd8deadSopenharmony_ci TEXTURE_BINDING_3D_OES 0x806A 855bd8deadSopenharmony_ci 865bd8deadSopenharmony_ciNew Procedures and Functions 875bd8deadSopenharmony_ci 885bd8deadSopenharmony_ci void TexImage3DOES(enum target, int level, enum internalFormat, 895bd8deadSopenharmony_ci sizei width, sizei height, sizei depth, int border, 905bd8deadSopenharmony_ci enum format, enum type, const void *pixels) 915bd8deadSopenharmony_ci 925bd8deadSopenharmony_ci Similar to 2D textures and cubemaps, <internalFormat> must match <format>. 935bd8deadSopenharmony_ci Please refer to table 3.1 of the OpenGL ES 2.0 specification for a list of 945bd8deadSopenharmony_ci valid <format> and <type> values. No texture borders are supported. 955bd8deadSopenharmony_ci 965bd8deadSopenharmony_ci void TexSubImage3DOES(enum target, int level, 975bd8deadSopenharmony_ci int xoffset, int yoffset, int zoffset, 985bd8deadSopenharmony_ci sizei width, sizei height, sizei depth, 995bd8deadSopenharmony_ci enum format, enum type, const void *pixels) 1005bd8deadSopenharmony_ci 1015bd8deadSopenharmony_ci void CopyTexSubImage3DOES(enum target, int level, 1025bd8deadSopenharmony_ci int xoffset, int yoffset, int zoffset, 1035bd8deadSopenharmony_ci int x, int y, sizei width, sizei height) 1045bd8deadSopenharmony_ci 1055bd8deadSopenharmony_ci CopyTexSubImage3DOES is supported. The internal format parameter can be 1065bd8deadSopenharmony_ci any of the base internal formats described for TexImage2D and TexImage3DOES 1075bd8deadSopenharmony_ci subject to the constraint that color buffer components can be dropped during 1085bd8deadSopenharmony_ci the conversion to the base internal format, but new components cannot be 1095bd8deadSopenharmony_ci added. For example, an RGB color buffer can be used to create LUMINANCE or 1105bd8deadSopenharmony_ci RGB textures, but not ALPHA, LUMINANCE_ALPHA, or RGBA textures. Table 3.3 1115bd8deadSopenharmony_ci of the OpenGL ES 2.0 specification summarizes the allowable framebuffer and 1125bd8deadSopenharmony_ci base internal format combinations. 1135bd8deadSopenharmony_ci 1145bd8deadSopenharmony_ci void CompressedTexImage3DOES(enum target, int level, enum internalformat, 1155bd8deadSopenharmony_ci sizei width, sizei height, sizei depth, 1165bd8deadSopenharmony_ci int border, sizei imageSize, const void *data) 1175bd8deadSopenharmony_ci 1185bd8deadSopenharmony_ci void CompressedTexSubImage3DOES(enum target, int level, 1195bd8deadSopenharmony_ci int xoffset, int yoffset, int zoffset, 1205bd8deadSopenharmony_ci sizei width, sizei height, sizei depth, 1215bd8deadSopenharmony_ci enum format, sizei imageSize, 1225bd8deadSopenharmony_ci const void *data) 1235bd8deadSopenharmony_ci 1245bd8deadSopenharmony_ci void FramebufferTexture3DOES(enum target, enum attachment, 1255bd8deadSopenharmony_ci enum textarget, uint texture, 1265bd8deadSopenharmony_ci int level, int zoffset); 1275bd8deadSopenharmony_ci 1285bd8deadSopenharmony_ci FramebufferTexture3DOES is derived from FramebufferTexture3DEXT. Please 1295bd8deadSopenharmony_ci refer to the EXT_framebuffer_object extension specification for a detailed 1305bd8deadSopenharmony_ci description of FramebufferTexture3DEXT. The only difference is that 1315bd8deadSopenharmony_ci FramebufferTexture3DOES can be used to render directly into the base level 1325bd8deadSopenharmony_ci of a 3D texture image only. The OES_fbo_render_mipmap extension removes 1335bd8deadSopenharmony_ci this limitation and allows rendering to any mip-level of a 3D texture. 1345bd8deadSopenharmony_ci 1355bd8deadSopenharmony_ciNew Keywords 1365bd8deadSopenharmony_ci 1375bd8deadSopenharmony_ci sampler3D 1385bd8deadSopenharmony_ci 1395bd8deadSopenharmony_ciGrammar changes 1405bd8deadSopenharmony_ci 1415bd8deadSopenharmony_ci The token SAMPLER3D is added to the list of tokens returned from lexical 1425bd8deadSopenharmony_ci analysis and the type_specifier_no_prec production. 1435bd8deadSopenharmony_ci 1445bd8deadSopenharmony_ciNew Built-in Functions 1455bd8deadSopenharmony_ci 1465bd8deadSopenharmony_ci texture3D() 1475bd8deadSopenharmony_ci texture3DProj() 1485bd8deadSopenharmony_ci texture3DLod() 1495bd8deadSopenharmony_ci texture3DProjLod() 1505bd8deadSopenharmony_ci 1515bd8deadSopenharmony_ciNew Macro Definitions 1525bd8deadSopenharmony_ci 1535bd8deadSopenharmony_ci #define GL_OES_texture_3D 1 1545bd8deadSopenharmony_ci 1555bd8deadSopenharmony_ciAdditions to Chapter 4 of the OpenGL ES Shading Language specification: 1565bd8deadSopenharmony_ci 1575bd8deadSopenharmony_ci Add the following to the table of basic types in section 4.1: 1585bd8deadSopenharmony_ci 1595bd8deadSopenharmony_ci Type: 1605bd8deadSopenharmony_ci sampler3D 1615bd8deadSopenharmony_ci 1625bd8deadSopenharmony_ci Meaning: 1635bd8deadSopenharmony_ci a handle for accessing a 3D texture 1645bd8deadSopenharmony_ci 1655bd8deadSopenharmony_ciAdditions to Chapter 8 of the OpenGL ES Shading Language specification: 1665bd8deadSopenharmony_ci 1675bd8deadSopenharmony_ci Add the following to the table of built-in functions in section 8.7: 1685bd8deadSopenharmony_ci 1695bd8deadSopenharmony_ci The built-in texture lookup functions texture3D, texture3DProj, 1705bd8deadSopenharmony_ci texture3DLod, and texture3DProjLod are optional, and must be enabled by 1715bd8deadSopenharmony_ci 1725bd8deadSopenharmony_ci #extension GL_OES_texture_3D : enable 1735bd8deadSopenharmony_ci 1745bd8deadSopenharmony_ci before being used. 1755bd8deadSopenharmony_ci 1765bd8deadSopenharmony_ci Syntax: 1775bd8deadSopenharmony_ci vec4 texture3D (sampler3D sampler, vec3 coord [, float bias] ) 1785bd8deadSopenharmony_ci vec4 texture3DProj (sampler3D sampler, vec4 coord [, float bias] ) 1795bd8deadSopenharmony_ci vec4 texture3DLod (sampler3D sampler, vec3 coord, float lod) 1805bd8deadSopenharmony_ci vec4 texture3DProjLod (sampler3D sampler, vec4 coord, float lod) 1815bd8deadSopenharmony_ci 1825bd8deadSopenharmony_ci Description: 1835bd8deadSopenharmony_ci Use the texture coordinate coord to do a texture lookup in the 3D 1845bd8deadSopenharmony_ci texture currently bound to sampler. For the projective ("Proj") 1855bd8deadSopenharmony_ci versions, the texture coordinate is divided by coord.q. 1865bd8deadSopenharmony_ci 1875bd8deadSopenharmony_ciErrors 1885bd8deadSopenharmony_ci 1895bd8deadSopenharmony_ci None. 1905bd8deadSopenharmony_ci 1915bd8deadSopenharmony_ciNew State 1925bd8deadSopenharmony_ci 1935bd8deadSopenharmony_ciGet Value Type Get Command Value Description 1945bd8deadSopenharmony_ci--------- ---- ----------- ----- ----------- 1955bd8deadSopenharmony_ciTEXTURE_BINDING_3D_OES Z+ GetIntegerv 0 texture object 1965bd8deadSopenharmony_ci bound to TEXTURE_3D 1975bd8deadSopenharmony_ciTEXTURE_WRAP_R_OES 1xZ2 GetTexParameteriv REPEAT texture coord "r" 1985bd8deadSopenharmony_ci wrap mode 1995bd8deadSopenharmony_ciMAX_3D_TEXTURE_SIZE_OES Z+ GetIntegerv 16 maximum 3D texture 2005bd8deadSopenharmony_ci image dimension 2015bd8deadSopenharmony_ci 2025bd8deadSopenharmony_ciRevision History 2035bd8deadSopenharmony_ci 2045bd8deadSopenharmony_ci7/06/2005 Aaftab Munshi Created the extension 2055bd8deadSopenharmony_ci6/09/2006 Aaftab Munshi Added OES suffixes 2065bd8deadSopenharmony_ci7/24/2007 Benj Lipchak Merged in details of language changes, removed 2075bd8deadSopenharmony_ci OES_framebuffer_object requirement (now core), 2085bd8deadSopenharmony_ci reformatted to 80 columns 209