15bd8deadSopenharmony_ciName 25bd8deadSopenharmony_ci 35bd8deadSopenharmony_ci ARB_texture_cube_map 45bd8deadSopenharmony_ci 55bd8deadSopenharmony_ciName Strings 65bd8deadSopenharmony_ci 75bd8deadSopenharmony_ci GL_ARB_texture_cube_map 85bd8deadSopenharmony_ci 95bd8deadSopenharmony_ciContact 105bd8deadSopenharmony_ci 115bd8deadSopenharmony_ci Michael Gold, NVIDIA (gold 'at' nvidia.com) 125bd8deadSopenharmony_ci 135bd8deadSopenharmony_ciNotice 145bd8deadSopenharmony_ci 155bd8deadSopenharmony_ci Copyright (c) 1999-2013 The Khronos Group Inc. Copyright terms at 165bd8deadSopenharmony_ci http://www.khronos.org/registry/speccopyright.html 175bd8deadSopenharmony_ci 185bd8deadSopenharmony_ciSpecification Update Policy 195bd8deadSopenharmony_ci 205bd8deadSopenharmony_ci Khronos-approved extension specifications are updated in response to 215bd8deadSopenharmony_ci issues and bugs prioritized by the Khronos OpenGL Working Group. For 225bd8deadSopenharmony_ci extensions which have been promoted to a core Specification, fixes will 235bd8deadSopenharmony_ci first appear in the latest version of that core Specification, and will 245bd8deadSopenharmony_ci eventually be backported to the extension document. This policy is 255bd8deadSopenharmony_ci described in more detail at 265bd8deadSopenharmony_ci https://www.khronos.org/registry/OpenGL/docs/update_policy.php 275bd8deadSopenharmony_ci 285bd8deadSopenharmony_ciStatus 295bd8deadSopenharmony_ci 305bd8deadSopenharmony_ci Complete. Approved by ARB on 12/8/1999 315bd8deadSopenharmony_ci 325bd8deadSopenharmony_ciVersion 335bd8deadSopenharmony_ci 345bd8deadSopenharmony_ci Last Modified Date: December 14, 1999 355bd8deadSopenharmony_ci 365bd8deadSopenharmony_ciNumber 375bd8deadSopenharmony_ci 385bd8deadSopenharmony_ci ARB Extension #7 395bd8deadSopenharmony_ci 405bd8deadSopenharmony_ciDependencies 415bd8deadSopenharmony_ci 425bd8deadSopenharmony_ci None. 435bd8deadSopenharmony_ci 445bd8deadSopenharmony_ci Written based on the wording of the OpenGL 1.2.1 specification but 455bd8deadSopenharmony_ci not dependent on it. 465bd8deadSopenharmony_ci 475bd8deadSopenharmony_ciOverview 485bd8deadSopenharmony_ci 495bd8deadSopenharmony_ci This extension provides a new texture generation scheme for cube 505bd8deadSopenharmony_ci map textures. Instead of the current texture providing a 1D, 2D, 515bd8deadSopenharmony_ci or 3D lookup into a 1D, 2D, or 3D texture image, the texture is a 525bd8deadSopenharmony_ci set of six 2D images representing the faces of a cube. The (s,t,r) 535bd8deadSopenharmony_ci texture coordinates are treated as a direction vector emanating from 545bd8deadSopenharmony_ci the center of a cube. At texture generation time, the interpolated 555bd8deadSopenharmony_ci per-fragment (s,t,r) selects one cube face 2D image based on the 565bd8deadSopenharmony_ci largest magnitude coordinate (the major axis). A new 2D (s,t) is 575bd8deadSopenharmony_ci calculated by dividing the two other coordinates (the minor axes 585bd8deadSopenharmony_ci values) by the major axis value. Then the new (s,t) is used to 595bd8deadSopenharmony_ci lookup into the selected 2D texture image face of the cube map. 605bd8deadSopenharmony_ci 615bd8deadSopenharmony_ci Unlike a standard 1D, 2D, or 3D texture that have just one target, 625bd8deadSopenharmony_ci a cube map texture has six targets, one for each of its six 2D texture 635bd8deadSopenharmony_ci image cube faces. All these targets must be consistent, complete, 645bd8deadSopenharmony_ci and have equal width and height (ie, square dimensions). 655bd8deadSopenharmony_ci 665bd8deadSopenharmony_ci This extension also provides two new texture coordinate generation modes 675bd8deadSopenharmony_ci for use in conjunction with cube map texturing. The reflection map 685bd8deadSopenharmony_ci mode generates texture coordinates (s,t,r) matching the vertex's 695bd8deadSopenharmony_ci eye-space reflection vector. The reflection map mode 705bd8deadSopenharmony_ci is useful for environment mapping without the singularity inherent 715bd8deadSopenharmony_ci in sphere mapping. The normal map mode generates texture coordinates 725bd8deadSopenharmony_ci (s,t,r) matching the vertex's transformed eye-space 735bd8deadSopenharmony_ci normal. The normal map mode is useful for sophisticated cube 745bd8deadSopenharmony_ci map texturing-based diffuse lighting models. 755bd8deadSopenharmony_ci 765bd8deadSopenharmony_ci The intent of the new texgen functionality is that an application using 775bd8deadSopenharmony_ci cube map texturing can use the new texgen modes to automatically 785bd8deadSopenharmony_ci generate the reflection or normal vectors used to look up into the 795bd8deadSopenharmony_ci cube map texture. 805bd8deadSopenharmony_ci 815bd8deadSopenharmony_ci An application note: When using cube mapping with dynamic cube 825bd8deadSopenharmony_ci maps (meaning the cube map texture is re-rendered every frame), 835bd8deadSopenharmony_ci by keeping the cube map's orientation pointing at the eye position, 845bd8deadSopenharmony_ci the texgen-computed reflection or normal vector texture coordinates 855bd8deadSopenharmony_ci can be always properly oriented for the cube map. However if the 865bd8deadSopenharmony_ci cube map is static (meaning that when view changes, the cube map 875bd8deadSopenharmony_ci texture is not updated), the texture matrix must be used to rotate 885bd8deadSopenharmony_ci the texgen-computed reflection or normal vector texture coordinates 895bd8deadSopenharmony_ci to match the orientation of the cube map. The rotation can be 905bd8deadSopenharmony_ci computed based on two vectors: 1) the direction vector from the cube 915bd8deadSopenharmony_ci map center to the eye position (both in world coordinates), and 2) 925bd8deadSopenharmony_ci the cube map orientation in world coordinates. The axis of rotation 935bd8deadSopenharmony_ci is the cross product of these two vectors; the angle of rotation is 945bd8deadSopenharmony_ci the arcsin of the dot product of these two vectors. 955bd8deadSopenharmony_ci 965bd8deadSopenharmony_ciIssues 975bd8deadSopenharmony_ci 985bd8deadSopenharmony_ci Should we place the normal/reflection vector in the (s,t,r) texture 995bd8deadSopenharmony_ci coordinates or (s,t,q) coordinates? 1005bd8deadSopenharmony_ci 1015bd8deadSopenharmony_ci RESOLUTION: (s,t,r). Even if hardware uses "q" for the third 1025bd8deadSopenharmony_ci component, the API should claim to support generation of (s,t,r) 1035bd8deadSopenharmony_ci and let the texture matrix (through a concatenation with the 1045bd8deadSopenharmony_ci user-supplied texture matrix) move "r" into "q". 1055bd8deadSopenharmony_ci 1065bd8deadSopenharmony_ci Should the texture coordinate generation functionality for cube 1075bd8deadSopenharmony_ci mapping be specified as a distinct extension from the actual cube 1085bd8deadSopenharmony_ci map texturing functionality? 1095bd8deadSopenharmony_ci 1105bd8deadSopenharmony_ci RESOLUTION: NO. Real applications and real implementations of 1115bd8deadSopenharmony_ci cube mapping will tie the texgen and texture generation functionality 1125bd8deadSopenharmony_ci together. Applications won't have to query two separate 1135bd8deadSopenharmony_ci extensions then. 1145bd8deadSopenharmony_ci 1155bd8deadSopenharmony_ci While applications will almost always want to use the texgen 1165bd8deadSopenharmony_ci functionality for automatically generating the reflection or normal 1175bd8deadSopenharmony_ci vector as texture coordinates (s,t,r), this extension does permit 1185bd8deadSopenharmony_ci an application to manually supply the reflection or normal vector 1195bd8deadSopenharmony_ci through glTexCoord3f explicitly. 1205bd8deadSopenharmony_ci 1215bd8deadSopenharmony_ci Note that the NV_texgen_reflection extension does "unbundle" 1225bd8deadSopenharmony_ci the texgen functionality from cube maps. 1235bd8deadSopenharmony_ci 1245bd8deadSopenharmony_ci Should you be able to have some texture coordinates computing 1255bd8deadSopenharmony_ci REFLECTION_MAP_ARB and others not? Same question with NORMAL_MAP_ARB. 1265bd8deadSopenharmony_ci 1275bd8deadSopenharmony_ci RESOLUTION: YES. This is the way that SPHERE_MAP works. It is 1285bd8deadSopenharmony_ci not clear that this would ever be useful though. 1295bd8deadSopenharmony_ci 1305bd8deadSopenharmony_ci Should something special be said about the handling of the q 1315bd8deadSopenharmony_ci texture coordinate for this spec? 1325bd8deadSopenharmony_ci 1335bd8deadSopenharmony_ci RESOLUTION: NO. But the following paragraph is useful for 1345bd8deadSopenharmony_ci implementors concerned about the handling of q. 1355bd8deadSopenharmony_ci 1365bd8deadSopenharmony_ci The REFLECTION_MAP_ARB and NORMAL_MAP_ARB modes are intended to supply 1375bd8deadSopenharmony_ci reflection and normal vectors for cube map texturing hardware. 1385bd8deadSopenharmony_ci When these modes are used for cube map texturing, the generated 1395bd8deadSopenharmony_ci texture coordinates can be thought of as an reflection vector. 1405bd8deadSopenharmony_ci The value of the q texture coordinate then simply scales the 1415bd8deadSopenharmony_ci vector but does not change its direction. Because only the vector 1425bd8deadSopenharmony_ci direction (not the vector magnitude) matters for cube map texturing, 1435bd8deadSopenharmony_ci implementations are free to leave q undefined when any of the s, 1445bd8deadSopenharmony_ci t, or r texture coordinates are generated using REFLECTION_MAP_ARB 1455bd8deadSopenharmony_ci or NORMAL_MAP_ARB. 1465bd8deadSopenharmony_ci 1475bd8deadSopenharmony_ci How should the cube faces be labeled? 1485bd8deadSopenharmony_ci 1495bd8deadSopenharmony_ci RESOLUTION: Match the render man specification's names of "px" 1505bd8deadSopenharmony_ci (positive X), "nx" (negative x), "py", "ny", "pz", and "nz". 1515bd8deadSopenharmony_ci There does not actually need to be an "ordering for the faces" 1525bd8deadSopenharmony_ci (Direct3D 7.0 does number their cube map faces.) For this 1535bd8deadSopenharmony_ci extension, the symbolic target names (TEXTURE_CUBE_MAP_POSITIVE_X_ARB, 1545bd8deadSopenharmony_ci etc) is sufficient without requiring any specific ordering. 1555bd8deadSopenharmony_ci 1565bd8deadSopenharmony_ci What coordinate system convention should be used? LHS or RHS? 1575bd8deadSopenharmony_ci 1585bd8deadSopenharmony_ci RESOLUTION: The coordinate system is left-handed if you think 1595bd8deadSopenharmony_ci of yourself within the cube. The coordinate system is 1605bd8deadSopenharmony_ci right-handed if you think of yourself outside the cube. 1615bd8deadSopenharmony_ci 1625bd8deadSopenharmony_ci This matches the convention of the RenderMan interface. If 1635bd8deadSopenharmony_ci you look at Figure 12.8 (page 265) in "The RenderMan Companion", 1645bd8deadSopenharmony_ci think of the cube being folded up with the observer inside 1655bd8deadSopenharmony_ci the cube. Then the coordinate system convention is 1665bd8deadSopenharmony_ci left-handed. 1675bd8deadSopenharmony_ci 1685bd8deadSopenharmony_ci The spec just linearly interpolates the reflection vectors computed 1695bd8deadSopenharmony_ci per-vertex across polygons. Is there a problem interpolating 1705bd8deadSopenharmony_ci reflection vectors in this way? 1715bd8deadSopenharmony_ci 1725bd8deadSopenharmony_ci Probably. The better approach would be to interpolate the eye 1735bd8deadSopenharmony_ci vector and normal vector over the polygon and perform the reflection 1745bd8deadSopenharmony_ci vector computation on a per-fragment basis. Not doing so is likely 1755bd8deadSopenharmony_ci to lead to artifacts because angular changes in the normal vector 1765bd8deadSopenharmony_ci result in twice as large a change in the reflection vector as normal 1775bd8deadSopenharmony_ci vector changes. The effect is likely to be reflections that become 1785bd8deadSopenharmony_ci glancing reflections too fast over the surface of the polygon. 1795bd8deadSopenharmony_ci 1805bd8deadSopenharmony_ci Note that this is an issue for REFLECTION_MAP_ARB, but not 1815bd8deadSopenharmony_ci NORMAL_MAP_ARB. 1825bd8deadSopenharmony_ci 1835bd8deadSopenharmony_ci What happens if an (s,t,q) is passed to cube map generation that 1845bd8deadSopenharmony_ci is close to (0,0,0), ie. a degenerate direction vector? 1855bd8deadSopenharmony_ci 1865bd8deadSopenharmony_ci RESOLUTION: Leave undefined what happens in this case (but 1875bd8deadSopenharmony_ci may not lead to GL interruption or termination). 1885bd8deadSopenharmony_ci 1895bd8deadSopenharmony_ci Note that a vector close to (0,0,0) may be generated as a 1905bd8deadSopenharmony_ci result of the per-fragment interpolation of (s,t,r) between 1915bd8deadSopenharmony_ci vertices. 1925bd8deadSopenharmony_ci 1935bd8deadSopenharmony_ci Do we need a distinct proxy texture mechanism for cube map 1945bd8deadSopenharmony_ci textures? 1955bd8deadSopenharmony_ci 1965bd8deadSopenharmony_ci RESOLUTION: YES. Cube map textures take up six times the 1975bd8deadSopenharmony_ci memory as a conventional 2D image texture so proxy 2D texture 1985bd8deadSopenharmony_ci determinations won't be of value for a cube map texture. 1995bd8deadSopenharmony_ci Cube maps need their own proxy target. 2005bd8deadSopenharmony_ci 2015bd8deadSopenharmony_ci Should we require the 2D texture image width and height to 2025bd8deadSopenharmony_ci be identical (ie, square only)? 2035bd8deadSopenharmony_ci 2045bd8deadSopenharmony_ci RESOLUTION: YES. This limitation is quite a reasonable limitation 2055bd8deadSopenharmony_ci and DirectX 7 has the same limitation. 2065bd8deadSopenharmony_ci 2075bd8deadSopenharmony_ci This restriction is enforced by generating an INVALID_VALUE 2085bd8deadSopenharmony_ci when calling TexImage2D or CopyTexImage2D with a non-equal 2095bd8deadSopenharmony_ci width and height. 2105bd8deadSopenharmony_ci 2115bd8deadSopenharmony_ci Some consideration was given to enforcing the "squarness" 2125bd8deadSopenharmony_ci constraint as a texture consistency constraint. This is 2135bd8deadSopenharmony_ci confusing however since the squareness is known up-front 2145bd8deadSopenharmony_ci at texture image specification time so it seems confusing 2155bd8deadSopenharmony_ci to silently report the usage error as a texture consistency 2165bd8deadSopenharmony_ci issue. 2175bd8deadSopenharmony_ci 2185bd8deadSopenharmony_ci Texture consistency still says that all the level 0 textures 2195bd8deadSopenharmony_ci of all six faces must have the same square size. 2205bd8deadSopenharmony_ci 2215bd8deadSopenharmony_ci If some combination of 1D, 2D, 3D, and cube map texturing is 2225bd8deadSopenharmony_ci enabled, which really operates? 2235bd8deadSopenharmony_ci 2245bd8deadSopenharmony_ci RESOLUTION: Cube map texturing. In OpenGL 1.2, 3D takes 2255bd8deadSopenharmony_ci priority over 2D takes priority over 1D. Cube mapping should 2265bd8deadSopenharmony_ci take priority over all conventional n-dimensional texturing 2275bd8deadSopenharmony_ci schemes. 2285bd8deadSopenharmony_ci 2295bd8deadSopenharmony_ci Does anything need to be said about combining cube mapping with 2305bd8deadSopenharmony_ci multitexture? 2315bd8deadSopenharmony_ci 2325bd8deadSopenharmony_ci RESOLUTION: NO. Cube mapping should be available on all texture 2335bd8deadSopenharmony_ci units. The hardware should fully orthogonal in its handling of 2345bd8deadSopenharmony_ci cube map textures. 2355bd8deadSopenharmony_ci 2365bd8deadSopenharmony_ci Does it make sense to support borders for cube map textures. 2375bd8deadSopenharmony_ci 2385bd8deadSopenharmony_ci Actually, it does. It would be nice if the texture border pixels 2395bd8deadSopenharmony_ci match the appropriate texels from the edges of the other cube map 2405bd8deadSopenharmony_ci faces that they junction with. For this reason, we'll leave the 2415bd8deadSopenharmony_ci texture border capability implicitly supported. 2425bd8deadSopenharmony_ci 2435bd8deadSopenharmony_ci How does mipmap level-of-detail selection work for cube map 2445bd8deadSopenharmony_ci textures? 2455bd8deadSopenharmony_ci 2465bd8deadSopenharmony_ci The existing spec's language about LOD selection is fine. 2475bd8deadSopenharmony_ci 2485bd8deadSopenharmony_ci Should the implementation dependent value for the maximum 2495bd8deadSopenharmony_ci texture size for a cube map be the same as MAX_TEXTURE_SIZE? 2505bd8deadSopenharmony_ci 2515bd8deadSopenharmony_ci RESOLUTION: NO. OpenGL 1.2 has a different MAX_3D_TEXTURE_SIZE 2525bd8deadSopenharmony_ci for 3D textures, and cube maps should take six times more space 2535bd8deadSopenharmony_ci than a 2D texture map of the same width & height. The implementation 2545bd8deadSopenharmony_ci dependent MAX_CUBE_MAP_TEXTURE_SIZE_ARB constant should be used for 2555bd8deadSopenharmony_ci cube maps then. 2565bd8deadSopenharmony_ci 2575bd8deadSopenharmony_ci Note that the proxy cube map texture provides a better way to 2585bd8deadSopenharmony_ci find out the maximum cube map texture size supported since the 2595bd8deadSopenharmony_ci proxy mechanism can take into account the internal format, etc. 2605bd8deadSopenharmony_ci 2615bd8deadSopenharmony_ci In section 3.8.10 when the "largest magnitude coordinate direction" 2625bd8deadSopenharmony_ci is choosen, what happens if two or more of the coordinates (rx,ry,rz) 2635bd8deadSopenharmony_ci have the identical magnitude? 2645bd8deadSopenharmony_ci 2655bd8deadSopenharmony_ci RESOLUTION: Implementations can define their own rule to choose 2665bd8deadSopenharmony_ci the largest magnitude coordinate direction whne two or more of the 2675bd8deadSopenharmony_ci coordinates have the identical magnitude. The only restriction is 2685bd8deadSopenharmony_ci that the rule must be deterministic and depend only on (rx,ry,rz). 2695bd8deadSopenharmony_ci 2705bd8deadSopenharmony_ci In practice, (s,t,r) is interpolated across polygons so the cases 2715bd8deadSopenharmony_ci where |s|==|t|, etc. are pretty arbitary (the equality depends on 2725bd8deadSopenharmony_ci interpolation precision). This extension could mandate a particular 2735bd8deadSopenharmony_ci rule, but that seems heavy-handed and there is no good reason that 2745bd8deadSopenharmony_ci multiple vendors should be forced to implement the same rule. 2755bd8deadSopenharmony_ci 2765bd8deadSopenharmony_ci Should there be limits on the supported border modes for cube maps? 2775bd8deadSopenharmony_ci 2785bd8deadSopenharmony_ci RESOLUTION: NO. The specificiation is written so that cube map 2795bd8deadSopenharmony_ci texturing proceeds just like conventional 2D texture mapping once 2805bd8deadSopenharmony_ci the face determination is made. 2815bd8deadSopenharmony_ci 2825bd8deadSopenharmony_ci Therefore, all OpenGL texture wrap modes should be supported though 2835bd8deadSopenharmony_ci some modes are clearly inappropriate for cube maps. The WRAP mode 2845bd8deadSopenharmony_ci is almost certainly incorrect for cube maps. Likewise, the CLAMP 2855bd8deadSopenharmony_ci mode without a texture border is almost certainly incorrect for cube 2865bd8deadSopenharmony_ci maps. CLAMP when a texture border is present and CLAMP_TO_EDGE are 2875bd8deadSopenharmony_ci both reasonably suited for cube maps. Ideally, CLAMP with a texture 2885bd8deadSopenharmony_ci border works best if the cube map edges can be replicated in the 2895bd8deadSopenharmony_ci approriate texture borders of adjacent cube map faces. In practice, 2905bd8deadSopenharmony_ci CLAMP_TO_EDGE works reasonably well in most circumstances. 2915bd8deadSopenharmony_ci 2925bd8deadSopenharmony_ci Perhaps another extension could support a special cube map wrap 2935bd8deadSopenharmony_ci mode that automatically wraps individual texel fetches to the 2945bd8deadSopenharmony_ci appropriate adjacent cube map face. The benefit from such a mode 2955bd8deadSopenharmony_ci is small and the implementation complexity is involved so this wrap 2965bd8deadSopenharmony_ci mode should not be required for a basic cube map texture extension. 2975bd8deadSopenharmony_ci 2985bd8deadSopenharmony_ci How is mipmap LOD selection handled for cube map textures? 2995bd8deadSopenharmony_ci 3005bd8deadSopenharmony_ci RESOLUTION: The specification is written so that cube map texturing 3015bd8deadSopenharmony_ci proceeds just like conventional 2D texture mapping once the face 3025bd8deadSopenharmony_ci determination is made. 3035bd8deadSopenharmony_ci 3045bd8deadSopenharmony_ci Thereforce, the partial differentials in Section 3.8.5 (page 3055bd8deadSopenharmony_ci 126) should be evaluated for the u and v parameters based on the 3065bd8deadSopenharmony_ci post-face determination s and t. 3075bd8deadSopenharmony_ci 3085bd8deadSopenharmony_ci In Section 2.10.3 "Normal Transformation", there are several versions 3095bd8deadSopenharmony_ci of the eye-space normal vector to choose from. Which one should 3105bd8deadSopenharmony_ci the NORMAL_MAP_ARB texgen mode use? 3115bd8deadSopenharmony_ci 3125bd8deadSopenharmony_ci RESOLUTION: nf. The nf vector is the final normal, post-rescale 3135bd8deadSopenharmony_ci normal and post-normalize. In practice, the rescale normal and 3145bd8deadSopenharmony_ci normalize operations do not change the direction of the vector 3155bd8deadSopenharmony_ci so the choice of which version of transformed normal is used is 3165bd8deadSopenharmony_ci not important for cube maps. 3175bd8deadSopenharmony_ci 3185bd8deadSopenharmony_ciNew Procedures and Functions 3195bd8deadSopenharmony_ci 3205bd8deadSopenharmony_ci None 3215bd8deadSopenharmony_ci 3225bd8deadSopenharmony_ciNew Tokens 3235bd8deadSopenharmony_ci 3245bd8deadSopenharmony_ci Accepted by the <param> parameters of TexGend, TexGenf, and TexGeni 3255bd8deadSopenharmony_ci when <pname> parameter is TEXTURE_GEN_MODE: 3265bd8deadSopenharmony_ci 3275bd8deadSopenharmony_ci NORMAL_MAP_ARB 0x8511 3285bd8deadSopenharmony_ci REFLECTION_MAP_ARB 0x8512 3295bd8deadSopenharmony_ci 3305bd8deadSopenharmony_ci When the <pname> parameter of TexGendv, TexGenfv, and TexGeniv is 3315bd8deadSopenharmony_ci TEXTURE_GEN_MODE, then the array <params> may also contain 3325bd8deadSopenharmony_ci NORMAL_MAP_ARB or REFLECTION_MAP_ARB. 3335bd8deadSopenharmony_ci 3345bd8deadSopenharmony_ci Accepted by the <cap> parameter of Enable, Disable, IsEnabled, and 3355bd8deadSopenharmony_ci by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, 3365bd8deadSopenharmony_ci and GetDoublev, and by the <target> parameter of BindTexture, 3375bd8deadSopenharmony_ci GetTexParameterfv, GetTexParameteriv, TexParameterf, TexParameteri, 3385bd8deadSopenharmony_ci TexParameterfv, and TexParameteriv: 3395bd8deadSopenharmony_ci 3405bd8deadSopenharmony_ci TEXTURE_CUBE_MAP_ARB 0x8513 3415bd8deadSopenharmony_ci 3425bd8deadSopenharmony_ci Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, 3435bd8deadSopenharmony_ci GetFloatv, and GetDoublev: 3445bd8deadSopenharmony_ci 3455bd8deadSopenharmony_ci TEXTURE_BINDING_CUBE_MAP_ARB 0x8514 3465bd8deadSopenharmony_ci 3475bd8deadSopenharmony_ci Accepted by the <target> parameter of GetTexImage, 3485bd8deadSopenharmony_ci GetTexLevelParameteriv, GetTexLevelParameterfv, TexImage2D, 3495bd8deadSopenharmony_ci CopyTexImage2D, TexSubImage2D, and CopySubTexImage2D: 3505bd8deadSopenharmony_ci 3515bd8deadSopenharmony_ci TEXTURE_CUBE_MAP_POSITIVE_X_ARB 0x8515 3525bd8deadSopenharmony_ci TEXTURE_CUBE_MAP_NEGATIVE_X_ARB 0x8516 3535bd8deadSopenharmony_ci TEXTURE_CUBE_MAP_POSITIVE_Y_ARB 0x8517 3545bd8deadSopenharmony_ci TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB 0x8518 3555bd8deadSopenharmony_ci TEXTURE_CUBE_MAP_POSITIVE_Z_ARB 0x8519 3565bd8deadSopenharmony_ci TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB 0x851A 3575bd8deadSopenharmony_ci 3585bd8deadSopenharmony_ci Accepted by the <target> parameter of GetTexLevelParameteriv, 3595bd8deadSopenharmony_ci GetTexLevelParameterfv, GetTexParameteriv, and TexImage2D: 3605bd8deadSopenharmony_ci 3615bd8deadSopenharmony_ci PROXY_TEXTURE_CUBE_MAP_ARB 0x851B 3625bd8deadSopenharmony_ci 3635bd8deadSopenharmony_ci Accepted by the <pname> parameter of GetBooleanv, GetDoublev, 3645bd8deadSopenharmony_ci GetIntegerv, and GetFloatv: 3655bd8deadSopenharmony_ci 3665bd8deadSopenharmony_ci MAX_CUBE_MAP_TEXTURE_SIZE_ARB 0x851C 3675bd8deadSopenharmony_ci 3685bd8deadSopenharmony_ciAdditions to Chapter 2 of the 1.2 Specification (OpenGL Operation) 3695bd8deadSopenharmony_ci 3705bd8deadSopenharmony_ci -- Section 2.10.4 "Generating Texture Coordinates" 3715bd8deadSopenharmony_ci 3725bd8deadSopenharmony_ci Change the last sentence in the 1st paragraph (page 37) to: 3735bd8deadSopenharmony_ci 3745bd8deadSopenharmony_ci "If <pname> is TEXTURE_GEN_MODE, then either <params> points to 3755bd8deadSopenharmony_ci or <param> is an integer that is one of the symbolic constants 3765bd8deadSopenharmony_ci OBJECT_LINEAR, EYE_LINEAR, SPHERE_MAP, REFLECTION_MAP_ARB, or 3775bd8deadSopenharmony_ci NORMAL_MAP_ARB." 3785bd8deadSopenharmony_ci 3795bd8deadSopenharmony_ci Add these paragraphs after the 4th paragraph (page 38): 3805bd8deadSopenharmony_ci 3815bd8deadSopenharmony_ci "If TEXTURE_GEN_MODE indicates REFLECTION_MAP_ARB, compute the 3825bd8deadSopenharmony_ci reflection vector r as described for the SPHERE_MAP mode. Then the 3835bd8deadSopenharmony_ci value assigned to an s coordinate (the first TexGen argument value 3845bd8deadSopenharmony_ci is S) is s = rx; the value assigned to a t coordinate is t = ry; 3855bd8deadSopenharmony_ci and the value assigned to a r coordinate is r = rz. Calling TexGen 3865bd8deadSopenharmony_ci with a <coord> of Q when <pname> indicates REFLECTION_MAP_ARB 3875bd8deadSopenharmony_ci generates the error INVALID_ENUM. 3885bd8deadSopenharmony_ci 3895bd8deadSopenharmony_ci If TEXTURE_GEN_MODE indicates NORMAL_MAP_ARB, compute the normal 3905bd8deadSopenharmony_ci vector nf as described in section 2.10.3. Then the value assigned 3915bd8deadSopenharmony_ci to an s coordinate (the first TexGen argument value is S) is s = 3925bd8deadSopenharmony_ci nfx; the value assigned to a t coordinate is t = nfy; and the 3935bd8deadSopenharmony_ci value assigned to a r coordinate is r = nfz. (The values nfx, nfy, 3945bd8deadSopenharmony_ci and nfz are the components of nf.) Calling TexGen with a <coord> 3955bd8deadSopenharmony_ci of Q when <pname> indicates NORMAL_MAP_ARB generates the error 3965bd8deadSopenharmony_ci INVALID_ENUM. 3975bd8deadSopenharmony_ci 3985bd8deadSopenharmony_ci The last paragraph's first sentence (page 38) should be changed to: 3995bd8deadSopenharmony_ci 4005bd8deadSopenharmony_ci "The state required for texture coordinate generation comprises a 4015bd8deadSopenharmony_ci five-valued integer for each coordinate indicating coordinate 4025bd8deadSopenharmony_ci generation mode, ..." 4035bd8deadSopenharmony_ci 4045bd8deadSopenharmony_ciAdditions to Chapter 3 of the 1.2 Specification (Rasterization) 4055bd8deadSopenharmony_ci 4065bd8deadSopenharmony_ci -- Section 3.6.5 "Pixel Transfer Operations" under "Convolution" 4075bd8deadSopenharmony_ci 4085bd8deadSopenharmony_ci Change this paragraph (page 103) to say: 4095bd8deadSopenharmony_ci 4105bd8deadSopenharmony_ci ... "If CONVOLUTION_2D is enabled, the two-dimensional convolution 4115bd8deadSopenharmony_ci filter is applied only to the two-dimensional images passed to 4125bd8deadSopenharmony_ci DrawPixels, CopyPixels, ReadPixels, TexImage2D, TexSubImage2D, 4135bd8deadSopenharmony_ci CopyTexImage2D, CopyTexSubImage2D, and CopyTexSubImage3D, and 4145bd8deadSopenharmony_ci returned by GetTexImage with one of the targets TEXTURE_2D, 4155bd8deadSopenharmony_ci TEXTURE_CUBE_MAP_POSITIVE_X_ARB, TEXTURE_CUBE_MAP_NEGATIVE_X_ARB, 4165bd8deadSopenharmony_ci TEXTURE_CUBE_MAP_POSITIVE_Y_ARB, TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB, 4175bd8deadSopenharmony_ci TEXTURE_CUBE_MAP_POSITIVE_Z_ARB, or TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB." 4185bd8deadSopenharmony_ci 4195bd8deadSopenharmony_ci -- Section 3.8.1 "Texture Image Specification" 4205bd8deadSopenharmony_ci 4215bd8deadSopenharmony_ci Change the second and third to last sentences on page 116 to: 4225bd8deadSopenharmony_ci 4235bd8deadSopenharmony_ci "<target> must be one of TEXTURE_2D for a 2D texture, or one of 4245bd8deadSopenharmony_ci TEXTURE_CUBE_MAP_POSITIVE_X_ARB, TEXTURE_CUBE_MAP_NEGATIVE_X_ARB, 4255bd8deadSopenharmony_ci TEXTURE_CUBE_MAP_POSITIVE_Y_ARB, TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB, 4265bd8deadSopenharmony_ci TEXTURE_CUBE_MAP_POSITIVE_Z_ARB, or TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB 4275bd8deadSopenharmony_ci for a cube map texture. Additionally, <target> can be either 4285bd8deadSopenharmony_ci PROXY_TEXTURE_2D for a 2D proxy texture or PROXY_TEXTURE_CUBE_MAP_ARB 4295bd8deadSopenharmony_ci for a cube map proxy texture as discussed in section 3.8.7." 4305bd8deadSopenharmony_ci 4315bd8deadSopenharmony_ci Add the following paragraphs after the first paragraph on page 117: 4325bd8deadSopenharmony_ci 4335bd8deadSopenharmony_ci "A 2D texture consists of a single 2D texture image. A cube 4345bd8deadSopenharmony_ci map texture is a set of six 2D texture images. The six cube map 4355bd8deadSopenharmony_ci texture targets form a single cube map texture though each target 4365bd8deadSopenharmony_ci names a distinct face of the cube map. The TEXTURE_CUBE_MAP_*_ARB 4375bd8deadSopenharmony_ci targets listed above update their appropriate cube map face 2D 4385bd8deadSopenharmony_ci texture image. Note that the six cube map 2D image tokens such as 4395bd8deadSopenharmony_ci TEXTURE_CUBE_MAP_POSITIVE_X_ARB are used when specifying, updating, 4405bd8deadSopenharmony_ci or querying one of a cube map's six 2D image, but when enabling 4415bd8deadSopenharmony_ci cube map texturing or binding to a cube map texture object (that is 4425bd8deadSopenharmony_ci when the cube map is accessed as a whole as opposed to a particular 4435bd8deadSopenharmony_ci 2D image), the TEXTURE_CUBE_MAP_ARB target is specified. 4445bd8deadSopenharmony_ci 4455bd8deadSopenharmony_ci When the target parameter to TexImage2D is one of the six cube map 4465bd8deadSopenharmony_ci 2D image targets, the error INVALID_VALUE is generated if the width 4475bd8deadSopenharmony_ci and height parameters are not equal. 4485bd8deadSopenharmony_ci 4495bd8deadSopenharmony_ci If cube map texturing is enabled at the time a primitive is 4505bd8deadSopenharmony_ci rasterized and if the set of six targets are not "cube complete", 4515bd8deadSopenharmony_ci then it is as if texture mapping were disabled. The targets of 4525bd8deadSopenharmony_ci a cube map texture are "cube complete" if the array 0 of all six 4535bd8deadSopenharmony_ci targets have identical, positive, and square dimensions, the array 4545bd8deadSopenharmony_ci 0 of all six targets were specified with the same internalformat, 4555bd8deadSopenharmony_ci and the array 0 of all six targets have the same border width." 4565bd8deadSopenharmony_ci 4575bd8deadSopenharmony_ci After the 14th paragraph (page 116) add: 4585bd8deadSopenharmony_ci 4595bd8deadSopenharmony_ci "In a similiar fashion, the maximum allowable width and height 4605bd8deadSopenharmony_ci (they must be the same) of a cube map texture must be at least 4615bd8deadSopenharmony_ci 2^(k-lod)+2bt for image arrays level 0 through k, where k is the 4625bd8deadSopenharmony_ci log base 2 of MAX_CUBE_MAP_TEXTURE_SIZE_ARB." 4635bd8deadSopenharmony_ci 4645bd8deadSopenharmony_ci -- Section 3.8.2 "Alternate Texture Image Specification Commands" 4655bd8deadSopenharmony_ci 4665bd8deadSopenharmony_ci Update the second paragraph (page 120) to say: 4675bd8deadSopenharmony_ci 4685bd8deadSopenharmony_ci ... "Currently, <target> must be 4695bd8deadSopenharmony_ci TEXTURE_2D, TEXTURE_CUBE_MAP_POSITIVE_X_ARB, 4705bd8deadSopenharmony_ci TEXTURE_CUBE_MAP_NEGATIVE_X_ARB, TEXTURE_CUBE_MAP_POSITIVE_Y_ARB, 4715bd8deadSopenharmony_ci TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB, TEXTURE_CUBE_MAP_POSITIVE_Z_ARB, 4725bd8deadSopenharmony_ci or TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB." ... 4735bd8deadSopenharmony_ci 4745bd8deadSopenharmony_ci Add after the second paragraph (page 120), the following: 4755bd8deadSopenharmony_ci 4765bd8deadSopenharmony_ci "When the target parameter to CopyTexImage2D is one of the six cube 4775bd8deadSopenharmony_ci map 2D image targets, the error INVALID_VALUE is generated if the 4785bd8deadSopenharmony_ci width and height parameters are not equal." 4795bd8deadSopenharmony_ci 4805bd8deadSopenharmony_ci Update the fourth paragraph (page 121) to say: 4815bd8deadSopenharmony_ci 4825bd8deadSopenharmony_ci ... "Currently the target arguments of TexSubImage1D and 4835bd8deadSopenharmony_ci CopyTexSubImage1D must be TEXTURE_1D, the <target> arguments of 4845bd8deadSopenharmony_ci TexSubImage2D and CopyTexSubImage2D must be one of TEXTURE_2D, 4855bd8deadSopenharmony_ci TEXTURE_CUBE_MAP_POSITIVE_X_ARB, TEXTURE_CUBE_MAP_NEGATIVE_X_ARB, 4865bd8deadSopenharmony_ci TEXTURE_CUBE_MAP_POSITIVE_Y_ARB, TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB, 4875bd8deadSopenharmony_ci TEXTURE_CUBE_MAP_POSITIVE_Z_ARB, or TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB, 4885bd8deadSopenharmony_ci and the <target> arguments of TexSubImage3D and CopyTexSubImage3D 4895bd8deadSopenharmony_ci must be TEXTURE_3D." ... 4905bd8deadSopenharmony_ci 4915bd8deadSopenharmony_ci -- Section 3.8.3 "Texture Parameters" 4925bd8deadSopenharmony_ci 4935bd8deadSopenharmony_ci Change paragraph one (page 124) to say: 4945bd8deadSopenharmony_ci 4955bd8deadSopenharmony_ci ... "<target> is the target, either TEXTURE_1D, 4965bd8deadSopenharmony_ci TEXTURE_2D, TEXTURE_3D, or TEXTURE_CUBE_MAP_ARB." ... 4975bd8deadSopenharmony_ci 4985bd8deadSopenharmony_ci Add a final paragraph saying: 4995bd8deadSopenharmony_ci 5005bd8deadSopenharmony_ci "Texture parameters for a cube map texture apply to cube map 5015bd8deadSopenharmony_ci as a whole; the six distinct 2D texture images use the 5025bd8deadSopenharmony_ci texture parameters of the cube map itself. 5035bd8deadSopenharmony_ci 5045bd8deadSopenharmony_ci -- Section 3.8.5 "Texture Minification" under "Mipmapping" 5055bd8deadSopenharmony_ci 5065bd8deadSopenharmony_ci Change the first full paragraph on page 130 to: 5075bd8deadSopenharmony_ci 5085bd8deadSopenharmony_ci ... "If texturing is enabled for one-, two-, or three-dimensional 5095bd8deadSopenharmony_ci texturing but not cube map texturing (and TEXTURE_MIN_FILTER 5105bd8deadSopenharmony_ci is one that requires a mipmap) at the time a primitive is 5115bd8deadSopenharmony_ci rasterized and if the set of arrays TEXTURE_BASE_LEVEL through q = 5125bd8deadSopenharmony_ci min{p,TEXTURE_MAX_LEVEL} is incomplete, based on the dimensions of 5135bd8deadSopenharmony_ci array 0, then it is as if texture mapping were disabled." 5145bd8deadSopenharmony_ci 5155bd8deadSopenharmony_ci Follow the first full paragraph on page 130 with: 5165bd8deadSopenharmony_ci 5175bd8deadSopenharmony_ci "If cube map texturing is enabled and TEXTURE_MIN_FILTER is one that 5185bd8deadSopenharmony_ci requires mipmap levels at the time a primitive is rasterized and 5195bd8deadSopenharmony_ci if the set of six targets are not "mipmap cube complete", then it 5205bd8deadSopenharmony_ci is as if texture mapping were disabled. The targets of a cube map 5215bd8deadSopenharmony_ci texture are "mipmap cube complete" if the six cube map targets are 5225bd8deadSopenharmony_ci "cube complete" and the set of arrays TEXTURE_BASE_LEVEL through 5235bd8deadSopenharmony_ci q are not incomplete (as described above)." 5245bd8deadSopenharmony_ci 5255bd8deadSopenharmony_ci -- Section 3.8.7 "Texture State and Proxy State" 5265bd8deadSopenharmony_ci 5275bd8deadSopenharmony_ci Change the first sentence of the first paragraph (page 131) to say: 5285bd8deadSopenharmony_ci 5295bd8deadSopenharmony_ci "The state necessary for texture can be divided into two categories. 5305bd8deadSopenharmony_ci First, there are the nine sets of mipmap arrays (one each for the 5315bd8deadSopenharmony_ci one-, two-, and three-dimensional texture targets and six for the 5325bd8deadSopenharmony_ci cube map texture targets) and their number." ... 5335bd8deadSopenharmony_ci 5345bd8deadSopenharmony_ci Change the second paragraph (page 132) to say: 5355bd8deadSopenharmony_ci 5365bd8deadSopenharmony_ci "In addition to the one-, two-, three-dimensional, and the six cube 5375bd8deadSopenharmony_ci map sets of image arrays, the partially instantiated one-, two-, 5385bd8deadSopenharmony_ci and three-dimensional and one cube map sets of proxy image arrays 5395bd8deadSopenharmony_ci are maintained." ... 5405bd8deadSopenharmony_ci 5415bd8deadSopenharmony_ci After the third paragraph (page 132) add: 5425bd8deadSopenharmony_ci 5435bd8deadSopenharmony_ci "The cube map proxy arrays are operated on in the same manner 5445bd8deadSopenharmony_ci when TexImage2D is executed with the <target> field specified as 5455bd8deadSopenharmony_ci PROXY_TEXTURE_CUBE_MAP_ARB with the addition that determining that a 5465bd8deadSopenharmony_ci given cube map texture is supported with PROXY_TEXTURE_CUBE_MAP_ARB 5475bd8deadSopenharmony_ci indicates that all six of the cube map 2D images are supported. 5485bd8deadSopenharmony_ci Likewise, if the specified PROXY_TEXTURE_CUBE_MAP_ARB is not 5495bd8deadSopenharmony_ci supported, none of the six cube map 2D images are supported." 5505bd8deadSopenharmony_ci 5515bd8deadSopenharmony_ci Change the second sentence of the fourth paragraph (page 132) to: 5525bd8deadSopenharmony_ci 5535bd8deadSopenharmony_ci "Therefore PROXY_TEXTURE_1D, PROXY_TEXTURE_2D, PROXY_TEXTURE_3D, 5545bd8deadSopenharmony_ci and PROXY_TEXTURE_CUBE_MAP_ARB cannot be used as textures, and their 5555bd8deadSopenharmony_ci images must never be queried using GetTexImage." ... 5565bd8deadSopenharmony_ci 5575bd8deadSopenharmony_ci -- Section 3.8.8 "Texture Objects" 5585bd8deadSopenharmony_ci 5595bd8deadSopenharmony_ci Change the first sentence of the first paragraph (page 132) to say: 5605bd8deadSopenharmony_ci 5615bd8deadSopenharmony_ci "In addition to the default textures TEXTURE_1D, TEXTURE_2D, 5625bd8deadSopenharmony_ci TEXTURE_3D, and TEXTURE_CUBE_MAP_ARB, named one-, two-, 5635bd8deadSopenharmony_ci and three-dimensional texture objects and cube map texture objects 5645bd8deadSopenharmony_ci can be created and operated on." ... 5655bd8deadSopenharmony_ci 5665bd8deadSopenharmony_ci Change the second paragraph (page 132) to say: 5675bd8deadSopenharmony_ci 5685bd8deadSopenharmony_ci "A texture object is created by binding an unused name to 5695bd8deadSopenharmony_ci TEXTURE_1D, TEXTURE_2D, TEXTURE_3D, or TEXTURE_CUBE_MAP_ARB." ... 5705bd8deadSopenharmony_ci "If the new texture object is bound to TEXTURE_1D, TEXTURE_2D, 5715bd8deadSopenharmony_ci TEXTURE_3D, or TEXTURE_CUBE_MAP_ARB, it remains a one-, two-, 5725bd8deadSopenharmony_ci three-dimensional, or cube map texture until it is deleted." 5735bd8deadSopenharmony_ci 5745bd8deadSopenharmony_ci Change the third paragraph (page 133) to say: 5755bd8deadSopenharmony_ci 5765bd8deadSopenharmony_ci "BindTexture may also be used to bind an existing texture object to 5775bd8deadSopenharmony_ci either TEXTURE_1D, TEXTURE_2D, TEXTURE_3D, or TEXTURE_CUBE_MAP_ARB." 5785bd8deadSopenharmony_ci 5795bd8deadSopenharmony_ci Change paragraph five (page 133) to say: 5805bd8deadSopenharmony_ci 5815bd8deadSopenharmony_ci "In the initial state, TEXTURE_1D, TEXTURE_2D, TEXTURE_3D, 5825bd8deadSopenharmony_ci and TEXTURE_CUBE_MAP have one-dimensional, two-dimensional, 5835bd8deadSopenharmony_ci three-dimensional, and cube map state vectors associated 5845bd8deadSopenharmony_ci with them respectively." ... "The initial, one-dimensional, 5855bd8deadSopenharmony_ci two-dimensional, three-dimensional, and cube map texture is therefore 5865bd8deadSopenharmony_ci operated upon, queried, and applied as TEXTURE_1D, TEXTUER_2D, 5875bd8deadSopenharmony_ci TEXTURE_3D, and TEXTURE_CUBE_MAP_ARB respectively while 0 is bound 5885bd8deadSopenharmony_ci to the corresponding targets." 5895bd8deadSopenharmony_ci 5905bd8deadSopenharmony_ci Change paragraph six (page 133) to say: 5915bd8deadSopenharmony_ci 5925bd8deadSopenharmony_ci ... "If a texture that is currently bound to one of the targets 5935bd8deadSopenharmony_ci TEXTURE_1D, TEXTURE_2D, TEXTURE_3D, or TEXTURE_CUBE_MAP_ARB is 5945bd8deadSopenharmony_ci deleted, it is as though BindTexture has been executed with the 5955bd8deadSopenharmony_ci same <target> and <texture> zero." ... 5965bd8deadSopenharmony_ci 5975bd8deadSopenharmony_ci -- Section 3.8.10 "Texture Application" 5985bd8deadSopenharmony_ci 5995bd8deadSopenharmony_ci Replace the beginning sentences of the first paragraph (page 138) 6005bd8deadSopenharmony_ci with: 6015bd8deadSopenharmony_ci 6025bd8deadSopenharmony_ci "Texturing is enabled or disabled using the generic Enable 6035bd8deadSopenharmony_ci and Disable commands, respectively, with the symbolic constants 6045bd8deadSopenharmony_ci TEXTURE_1D, TEXTURE_2D, TEXTURE_3D, or TEXTURE_CUBE_MAP_ARB to enable 6055bd8deadSopenharmony_ci the one-dimensional, two-dimensional, three-dimensional, or cube 6065bd8deadSopenharmony_ci map texturing respectively. If both two- and one-dimensional 6075bd8deadSopenharmony_ci textures are enabled, the two-dimensional texture is used. If the 6085bd8deadSopenharmony_ci three-dimensional and either of the two- or one-dimensional textures 6095bd8deadSopenharmony_ci is enabled, the three-dimensional texture is used. If the cube map 6105bd8deadSopenharmony_ci texture and any of the three-, two-, or one-dimensional textures is 6115bd8deadSopenharmony_ci enabled, then cube map texturing is used. If texturing is disabled, 6125bd8deadSopenharmony_ci a rasterized fragment is passed on unaltered to the next stage of the 6135bd8deadSopenharmony_ci GL (although its texture coordinates may be discarded). Otherwise, 6145bd8deadSopenharmony_ci a texture value is found according to the parameter values of the 6155bd8deadSopenharmony_ci currently bound texture image of the appropriate dimensionality. 6165bd8deadSopenharmony_ci 6175bd8deadSopenharmony_ci However, when cube map texturing is enabled, the rules are 6185bd8deadSopenharmony_ci more complicated. For cube map texturing, the (s,t,r) texture 6195bd8deadSopenharmony_ci coordinates are treated as a direction vector (rx,ry,rz) emanating 6205bd8deadSopenharmony_ci from the center of a cube. (The q coordinate can be ignored since 6215bd8deadSopenharmony_ci it merely scales the vector without affecting the direction.) At 6225bd8deadSopenharmony_ci texture application time, the interpolated per-fragment (s,t,r) 6235bd8deadSopenharmony_ci selects one of the cube map face's 2D image based on the largest 6245bd8deadSopenharmony_ci magnitude coordinate direction (the major axis direction). If two 6255bd8deadSopenharmony_ci or more coordinates have the identical magnitude, the implementation 6265bd8deadSopenharmony_ci may define the rule to disambiguate this situation. The rule must 6275bd8deadSopenharmony_ci be deterministic and depend only on (rx,ry,rz). The target column 6285bd8deadSopenharmony_ci in the table below explains how the major axis direction maps to 6295bd8deadSopenharmony_ci the 2D image of a particular cube map target. 6305bd8deadSopenharmony_ci 6315bd8deadSopenharmony_ci major axis 6325bd8deadSopenharmony_ci direction target sc tc ma 6335bd8deadSopenharmony_ci ---------- ------------------------------- --- --- --- 6345bd8deadSopenharmony_ci +rx TEXTURE_CUBE_MAP_POSITIVE_X_ARB -rz -ry rx 6355bd8deadSopenharmony_ci -rx TEXTURE_CUBE_MAP_NEGATIVE_X_ARB +rz -ry rx 6365bd8deadSopenharmony_ci +ry TEXTURE_CUBE_MAP_POSITIVE_Y_ARB +rx +rz ry 6375bd8deadSopenharmony_ci -ry TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB +rx -rz ry 6385bd8deadSopenharmony_ci +rz TEXTURE_CUBE_MAP_POSITIVE_Z_ARB +rx -ry rz 6395bd8deadSopenharmony_ci -rz TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB -rx -ry rz 6405bd8deadSopenharmony_ci 6415bd8deadSopenharmony_ci Using the sc, tc, and ma determined by the major axis direction as 6425bd8deadSopenharmony_ci specified in the table above, an updated (s,t) is calculated as 6435bd8deadSopenharmony_ci follows 6445bd8deadSopenharmony_ci 6455bd8deadSopenharmony_ci s = ( sc/|ma| + 1 ) / 2 6465bd8deadSopenharmony_ci t = ( tc/|ma| + 1 ) / 2 6475bd8deadSopenharmony_ci 6485bd8deadSopenharmony_ci This new (s,t) is used to find a texture value in the determined 6495bd8deadSopenharmony_ci face's 2D texture image using the rules given in sections 3.8.5 6505bd8deadSopenharmony_ci and 3.8.6." ... 6515bd8deadSopenharmony_ci 6525bd8deadSopenharmony_ciAdditions to Chapter 4 of the 1.2 Specification (Per-Fragment Operations 6535bd8deadSopenharmony_ciand the Frame Buffer) 6545bd8deadSopenharmony_ci 6555bd8deadSopenharmony_ci None 6565bd8deadSopenharmony_ci 6575bd8deadSopenharmony_ciAdditions to Chapter 5 of the 1.2 Specification (Special Functions) 6585bd8deadSopenharmony_ci 6595bd8deadSopenharmony_ci -- Section 5.4 "Display Lists" 6605bd8deadSopenharmony_ci 6615bd8deadSopenharmony_ci In the first paragraph (page 179), add PROXY_TEXTURE_CUBE_MAP_ARB 6625bd8deadSopenharmony_ci to the list of PROXY_* tokens. 6635bd8deadSopenharmony_ci 6645bd8deadSopenharmony_ciAdditions to Chapter 6 of the 1.2 Specification (State and State Requests) 6655bd8deadSopenharmony_ci 6665bd8deadSopenharmony_ci -- Section 6.1.3 "Enumerated Queries" 6675bd8deadSopenharmony_ci 6685bd8deadSopenharmony_ci Change the fourth paragraph (page 183) to say: 6695bd8deadSopenharmony_ci 6705bd8deadSopenharmony_ci "The GetTexParameter parameter <target> may be one of TEXTURE_1D, 6715bd8deadSopenharmony_ci TEXTURE_2D, TEXTURE_3D, or TEXTURE_CUBE_MAP_ARB, indicating the 6725bd8deadSopenharmony_ci currently bound one-dimensional, two-dimensional, three-dimensional, 6735bd8deadSopenharmony_ci or cube map texture object. For GetTexLevelParameter, 6745bd8deadSopenharmony_ci <target> may be one of TEXTURE_1D, TEXTURE_2D, TEXTURE_3D, 6755bd8deadSopenharmony_ci TEXTURE_CUBE_MAP_POSITIVE_X_ARB, TEXTURE_CUBE_MAP_NEGATIVE_X_ARB, 6765bd8deadSopenharmony_ci TEXTURE_CUBE_MAP_POSITIVE_Y_ARB, TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB, 6775bd8deadSopenharmony_ci TEXTURE_CUBE_MAP_POSITIVE_Z_ARB, TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB, 6785bd8deadSopenharmony_ci PROXY_TEXTURE_1D, PROXY_TEXTURE_2D, PROXY_TEXTURE_3D, or 6795bd8deadSopenharmony_ci PROXY_TEXTURE_CUBE_MAP_ARB, indicating the one-dimensional 6805bd8deadSopenharmony_ci texture object, two-dimensional texture object, three-dimensional 6815bd8deadSopenharmony_ci texture object, or one of the six distinct 2D images making up 6825bd8deadSopenharmony_ci the cube map texture object or one-dimensional, two-dimensional, 6835bd8deadSopenharmony_ci three-dimensional, or cube map proxy state vector. Note that 6845bd8deadSopenharmony_ci TEXTURE_CUBE_MAP_ARB is not a valid <target> parameter for 6855bd8deadSopenharmony_ci GetTexLevelParameter because it does not specify a particular cube 6865bd8deadSopenharmony_ci map face." 6875bd8deadSopenharmony_ci 6885bd8deadSopenharmony_ci -- Section 6.1.4 "Texture Queries" 6895bd8deadSopenharmony_ci 6905bd8deadSopenharmony_ci Change the first paragraph (page 184) to read: 6915bd8deadSopenharmony_ci 6925bd8deadSopenharmony_ci ... "It is somewhat different from the other get commands; <tex> 6935bd8deadSopenharmony_ci is a symbolic value indicating which texture (or texture face in the 6945bd8deadSopenharmony_ci case of a cube map texture target name) is to be obtained. 6955bd8deadSopenharmony_ci TEXTURE_1D indicates a one-dimensional texture, TEXTURE_2D 6965bd8deadSopenharmony_ci indicates a two-dimensional texture, TEXTURE_3D indicates a 6975bd8deadSopenharmony_ci three-dimensional texture, and TEXTURE_CUBE_MAP_POSITIVE_X_ARB, 6985bd8deadSopenharmony_ci TEXTURE_CUBE_MAP_NEGATIVE_X_ARB, TEXTURE_CUBE_MAP_POSITIVE_Y_ARB, 6995bd8deadSopenharmony_ci TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB, TEXTURE_CUBE_MAP_POSITIVE_Z_ARB, 7005bd8deadSopenharmony_ci and TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB indicate the respective face of 7015bd8deadSopenharmony_ci a cube map texture. 7025bd8deadSopenharmony_ci 7035bd8deadSopenharmony_ciAdditions to the GLX Specification 7045bd8deadSopenharmony_ci 7055bd8deadSopenharmony_ci None 7065bd8deadSopenharmony_ci 7075bd8deadSopenharmony_ciErrors 7085bd8deadSopenharmony_ci 7095bd8deadSopenharmony_ci INVALID_ENUM is generated when TexGen is called with a <coord> of Q 7105bd8deadSopenharmony_ci when <pname> indicates REFLECTION_MAP_ARB or NORMAL_MAP_ARB. 7115bd8deadSopenharmony_ci 7125bd8deadSopenharmony_ci INVALID_VALUE is generated when the target parameter to TexImage2D 7135bd8deadSopenharmony_ci or CopyTexImage2D is one of the six cube map 2D image targets and 7145bd8deadSopenharmony_ci the width and height parameters are not equal. 7155bd8deadSopenharmony_ci 7165bd8deadSopenharmony_ciNew State 7175bd8deadSopenharmony_ci 7185bd8deadSopenharmony_ci(table 6.12, p202) add the following entries: 7195bd8deadSopenharmony_ci 7205bd8deadSopenharmony_ciGet Value Type Get Command Initial Value Description Sec Attribute 7215bd8deadSopenharmony_ci--------- ---- ----------- ------------- ----------- ------ -------------- 7225bd8deadSopenharmony_ciTEXTURE_CUBE_MAP_ARB B IsEnabled False True if cube map 3.8.10 texture/enable 7235bd8deadSopenharmony_ci texturing is enabled 7245bd8deadSopenharmony_ciTEXTURE_BINDING_CUBE_MAP_ARB Z+ GetIntegerv 0 Texture object 3.8.8 texture 7255bd8deadSopenharmony_ci for TEXTURE_CUBE_MAP 7265bd8deadSopenharmony_ciTEXTURE_CUBE_MAP_POSITIVE_X_ARB nxI GetTexImage see 3.8 positive x face 3.8 - 7275bd8deadSopenharmony_ci cube map texture 7285bd8deadSopenharmony_ci image at lod i 7295bd8deadSopenharmony_ciTEXTURE_CUBE_MAP_NEGATIVE_X_ARB nxI GetTexImage see 3.8 negative x face 3.8 - 7305bd8deadSopenharmony_ci cube map texture 7315bd8deadSopenharmony_ci image at lod i 7325bd8deadSopenharmony_ciTEXTURE_CUBE_MAP_POSITIVE_Y_ARB nxI GetTexImage see 3.8 positive y face 3.8 - 7335bd8deadSopenharmony_ci cube map texture 7345bd8deadSopenharmony_ci image at lod i 7355bd8deadSopenharmony_ciTEXTURE_CUBE_MAP_NEGATIVE_Y_ARB nxI GetTexImage see 3.8 negative y face 3.8 - 7365bd8deadSopenharmony_ci cube map texture 7375bd8deadSopenharmony_ci image at lod i 7385bd8deadSopenharmony_ciTEXTURE_CUBE_MAP_POSITIVE_Z_ARB nxI GetTexImage see 3.8 positive z face 3.8 - 7395bd8deadSopenharmony_ci cube map texture 7405bd8deadSopenharmony_ci image at lod i 7415bd8deadSopenharmony_ciTEXTURE_CUBE_MAP_NEGATIVE_Z_ARB nxI GetTexImage see 3.8 negative z face 3.8 - 7425bd8deadSopenharmony_ci cube map texture 7435bd8deadSopenharmony_ci image at lod i 7445bd8deadSopenharmony_ci 7455bd8deadSopenharmony_ci(table 6.14, p204) change the entry for TEXTURE_GEN_MODE to: 7465bd8deadSopenharmony_ci 7475bd8deadSopenharmony_ciGet Value Type Get Command Initial Value Description Sec Attribute 7485bd8deadSopenharmony_ci--------- ---- ----------- ------------- ----------- ------ --------- 7495bd8deadSopenharmony_ciTEXTURE_GEN_MODE 4xZ5 GetTexGeniv EYE_LINEAR Function used for 2.10.4 texture 7505bd8deadSopenharmony_ci texgen (for s,t,r, 7515bd8deadSopenharmony_ci and q) 7525bd8deadSopenharmony_ci 7535bd8deadSopenharmony_ci(the type changes from 4xZ3 to 4xZ5) 7545bd8deadSopenharmony_ci 7555bd8deadSopenharmony_ciNew Implementation Dependent State 7565bd8deadSopenharmony_ci 7575bd8deadSopenharmony_ci(table 6.24, p214) add the following entry: 7585bd8deadSopenharmony_ci 7595bd8deadSopenharmony_ciGet Value Type Get Command Minimum Value Description Sec Attribute 7605bd8deadSopenharmony_ci--------- ---- ----------- ------------- ----------- ------ -------------- 7615bd8deadSopenharmony_ciMAX_CUBE_MAP_TEXTURE_SIZE_ARB Z+ GetIntegerv 16 Maximum cube map 3.8.1 - 7625bd8deadSopenharmony_ci texture image 7635bd8deadSopenharmony_ci dimension 7645bd8deadSopenharmony_ci 7655bd8deadSopenharmony_ciBackwards Compatibility 7665bd8deadSopenharmony_ci 7675bd8deadSopenharmony_ci This extension replaces EXT_texture_cube_map. The tokens and 7685bd8deadSopenharmony_ci name strings now refer to ARB instead of EXT. Enumerant values 7695bd8deadSopenharmony_ci are unchanged. 770