15bd8deadSopenharmony_ciName 25bd8deadSopenharmony_ci 35bd8deadSopenharmony_ci ARB_vertex_shader 45bd8deadSopenharmony_ci 55bd8deadSopenharmony_ciName Strings 65bd8deadSopenharmony_ci 75bd8deadSopenharmony_ci GL_ARB_vertex_shader 85bd8deadSopenharmony_ci 95bd8deadSopenharmony_ciContributors 105bd8deadSopenharmony_ci 115bd8deadSopenharmony_ci Kurt Akeley 125bd8deadSopenharmony_ci Allen Akin 135bd8deadSopenharmony_ci Dave Baldwin 145bd8deadSopenharmony_ci Pat Brown 155bd8deadSopenharmony_ci Matt Craighead 165bd8deadSopenharmony_ci Cass Everitt 175bd8deadSopenharmony_ci Evan Hart 185bd8deadSopenharmony_ci Phil Huxley 195bd8deadSopenharmony_ci Dale Kirkland 205bd8deadSopenharmony_ci John Kessenich 215bd8deadSopenharmony_ci Steve Koren 225bd8deadSopenharmony_ci Jon Leech 235bd8deadSopenharmony_ci Bill Licea-Kane 245bd8deadSopenharmony_ci Benjamin Lipchak 255bd8deadSopenharmony_ci Barthold Lichtenbelt 265bd8deadSopenharmony_ci Kent Lin 275bd8deadSopenharmony_ci Jeremy Morris 285bd8deadSopenharmony_ci Teri Morrison 295bd8deadSopenharmony_ci Glenn Ortner 305bd8deadSopenharmony_ci Randi Rost 315bd8deadSopenharmony_ci Jeremy Sandmel 325bd8deadSopenharmony_ci Folker Schamel 335bd8deadSopenharmony_ci Eskil Steenberg 345bd8deadSopenharmony_ci 355bd8deadSopenharmony_ci The ARB_vertex_program working group members. Several concepts and 365bd8deadSopenharmony_ci chunks of text are copied from the ARB_vertex_program specification. 375bd8deadSopenharmony_ci 385bd8deadSopenharmony_ciContact 395bd8deadSopenharmony_ci 405bd8deadSopenharmony_ci Barthold Lichtenbelt, 3Dlabs, Inc. (barthold 'at' 3dlabs.com) 415bd8deadSopenharmony_ci Randi Rost, 3Dlabs, Inc. (rost 'at' 3dlabs.com) 425bd8deadSopenharmony_ci 435bd8deadSopenharmony_ciNotice 445bd8deadSopenharmony_ci 455bd8deadSopenharmony_ci Copyright (c) 2003-2013 The Khronos Group Inc. Copyright terms at 465bd8deadSopenharmony_ci http://www.khronos.org/registry/speccopyright.html 475bd8deadSopenharmony_ci 485bd8deadSopenharmony_ciSpecification Update Policy 495bd8deadSopenharmony_ci 505bd8deadSopenharmony_ci Khronos-approved extension specifications are updated in response to 515bd8deadSopenharmony_ci issues and bugs prioritized by the Khronos OpenGL Working Group. For 525bd8deadSopenharmony_ci extensions which have been promoted to a core Specification, fixes will 535bd8deadSopenharmony_ci first appear in the latest version of that core Specification, and will 545bd8deadSopenharmony_ci eventually be backported to the extension document. This policy is 555bd8deadSopenharmony_ci described in more detail at 565bd8deadSopenharmony_ci https://www.khronos.org/registry/OpenGL/docs/update_policy.php 575bd8deadSopenharmony_ci 585bd8deadSopenharmony_ciIP Status 595bd8deadSopenharmony_ci 605bd8deadSopenharmony_ci As described in the Contributor License, which can be found at 615bd8deadSopenharmony_ci http://developer.3dlabs.com/openGL2/specs/3dlabs_contributor.pdf . 625bd8deadSopenharmony_ci 635bd8deadSopenharmony_ciStatus 645bd8deadSopenharmony_ci 655bd8deadSopenharmony_ci Complete. Approved by the ARB on June 11, 2003. 665bd8deadSopenharmony_ci Updated revision 0.81 approved by the ARB on June 17, 2004. 675bd8deadSopenharmony_ci 685bd8deadSopenharmony_ciVersion 695bd8deadSopenharmony_ci 705bd8deadSopenharmony_ci Last Modified Date: December 14, 2009 715bd8deadSopenharmony_ci Author Revision: 0.83 725bd8deadSopenharmony_ci 735bd8deadSopenharmony_ciNumber 745bd8deadSopenharmony_ci 755bd8deadSopenharmony_ci ARB Extension #31 765bd8deadSopenharmony_ci 775bd8deadSopenharmony_ciDependencies 785bd8deadSopenharmony_ci 795bd8deadSopenharmony_ci OpenGL 1.0 is required. 805bd8deadSopenharmony_ci 815bd8deadSopenharmony_ci This extension is written against version 1.10 of the OpenGL Shading 825bd8deadSopenharmony_ci Language Specification. 835bd8deadSopenharmony_ci 845bd8deadSopenharmony_ci The extension is written against the OpenGL 1.4 Specification. 855bd8deadSopenharmony_ci 865bd8deadSopenharmony_ci The ARB_shader_objects extension is required. 875bd8deadSopenharmony_ci 885bd8deadSopenharmony_ciOverview 895bd8deadSopenharmony_ci 905bd8deadSopenharmony_ci This extension adds programmable vertex level processing to OpenGL. The 915bd8deadSopenharmony_ci application can write vertex shaders in a high level language as defined 925bd8deadSopenharmony_ci in the OpenGL Shading Language specification. The language itself is not 935bd8deadSopenharmony_ci discussed here. A vertex shader replaces the transformation, texture 945bd8deadSopenharmony_ci coordinate generation and lighting parts of OpenGL, and it also adds 955bd8deadSopenharmony_ci texture access at the vertex level. Furthermore, management of vertex 965bd8deadSopenharmony_ci shader objects and loading generic attributes are discussed. A vertex 975bd8deadSopenharmony_ci shader object, attached to a program object, can be compiled and linked 985bd8deadSopenharmony_ci to produce an executable that runs on the vertex processor in OpenGL. 995bd8deadSopenharmony_ci This extension also defines how such an executable interacts with the 1005bd8deadSopenharmony_ci fixed functionality vertex processing of OpenGL 1.4. 1015bd8deadSopenharmony_ci 1025bd8deadSopenharmony_ciIssues 1035bd8deadSopenharmony_ci 1045bd8deadSopenharmony_ci 1) What does need to be said about invariance (Appendix A of the OpenGL 1055bd8deadSopenharmony_ci 1.4 spec)? 1065bd8deadSopenharmony_ci 1075bd8deadSopenharmony_ci DISCUSSION: Numerous rules and proposals have been discussed. In the 1085bd8deadSopenharmony_ci end, simplicity is an important goal. It is always possible to later add 1095bd8deadSopenharmony_ci more invariance rules, if it turns out to be desirable. 1105bd8deadSopenharmony_ci 1115bd8deadSopenharmony_ci RESOLUTION: The same shader will produce the same result when run 1125bd8deadSopenharmony_ci multiple times with the same input. The wording 'the same shader' means 1135bd8deadSopenharmony_ci a program object that is populated with the same source strings, which 1145bd8deadSopenharmony_ci are compiled and then linked, possibly multiple times. This program 1155bd8deadSopenharmony_ci object is executed using the same GL state vector. 1165bd8deadSopenharmony_ci 1175bd8deadSopenharmony_ci Position invariance between a vertex shader and the fixed functionality 1185bd8deadSopenharmony_ci pipeline is important for certain applications. Therefore there must be 1195bd8deadSopenharmony_ci a way to guarantee that a vertex shader produces the exact same position 1205bd8deadSopenharmony_ci for a vertex as the fixed function pipeline does. This is achieved by 1215bd8deadSopenharmony_ci using the built-in function ftransform in a vertex shader, and assign it 1225bd8deadSopenharmony_ci to the output variable gl_Position. The shader does this instead of 1235bd8deadSopenharmony_ci computing the product of the ModelViewProjection matrix with the vertex 1245bd8deadSopenharmony_ci position. See section 2.15.6 for more. 1255bd8deadSopenharmony_ci 1265bd8deadSopenharmony_ci 2) Should we take the API commands to load generic vertex attributes 1275bd8deadSopenharmony_ci from ARB_vertex_program? 1285bd8deadSopenharmony_ci 1295bd8deadSopenharmony_ci DISCUSSION: At first glance these commands, for example 1305bd8deadSopenharmony_ci VertexAttrib3fvARB, look like exactly what this extension needs. 1315bd8deadSopenharmony_ci However, if we re-use these commands here, how does the GL 1325bd8deadSopenharmony_ci implementation decide where attributes go when using shaders written 1335bd8deadSopenharmony_ci using ARB_vertex_program or this extension? What happens to the 1345bd8deadSopenharmony_ci attribute value when switching between an ARB_vertex_program and an 1355bd8deadSopenharmony_ci ARB_vertex_shader shader? How does this resolve with respect to 1365bd8deadSopenharmony_ci undefined aliasing defined in ARB_vertex_program and the no aliasing 1375bd8deadSopenharmony_ci defined in this extension? 1385bd8deadSopenharmony_ci 1395bd8deadSopenharmony_ci RESOLUTION: Resolved, we will re-use these entry points. It is very 1405bd8deadSopenharmony_ci convenient for an ISV to be able to re-use the entry points to load 1415bd8deadSopenharmony_ci data, and only have to switch shaders when it wants to go from an 1425bd8deadSopenharmony_ci ARB_vertex_program shader to an ARB_vertex_shader shader. This extension 1435bd8deadSopenharmony_ci allows for no aliasing among generic attributes and standard vertex 1445bd8deadSopenharmony_ci attributes, whereas ARB_vertex_program has the concept of undefined 1455bd8deadSopenharmony_ci aliasing. In order to resolve this the interactions section extends 1465bd8deadSopenharmony_ci ARB_vertex_program to expose this no aliasing approach. Note that we do 1475bd8deadSopenharmony_ci not lift the restriction in the grammar on invalid attribute binding 1485bd8deadSopenharmony_ci pairs, see Table X.2.1 in the ARB_vertex_program specification. 1495bd8deadSopenharmony_ci 1505bd8deadSopenharmony_ci 3) Should we take the API commands to load generic vertex arrays from 1515bd8deadSopenharmony_ci ARB_vertex_program? 1525bd8deadSopenharmony_ci 1535bd8deadSopenharmony_ci DISCUSSION: See issue 2. 1545bd8deadSopenharmony_ci 1555bd8deadSopenharmony_ci RESOLUTION: Resolved, yes we will re-use these entry points. See also 1565bd8deadSopenharmony_ci the previous issue resolution. 1575bd8deadSopenharmony_ci 1585bd8deadSopenharmony_ci 4) Should we take the API commands to query the values of generic 1595bd8deadSopenharmony_ci attributes from ARB_vertex_program? 1605bd8deadSopenharmony_ci 1615bd8deadSopenharmony_ci DISCUSSION: This goes hand in hand with issue 2. 1625bd8deadSopenharmony_ci 1635bd8deadSopenharmony_ci RESOLUTION: Yes we will. 1645bd8deadSopenharmony_ci 1655bd8deadSopenharmony_ci 5) Do we need to specify how Evaluators and AUTO_NORMAL generation 1665bd8deadSopenharmony_ci interacts? 1675bd8deadSopenharmony_ci 1685bd8deadSopenharmony_ci DISCUSSION: ARB_vertex_program specifies that for evaluated normals the 1695bd8deadSopenharmony_ci normal is no longer automatically normalized when a vertex shader is 1705bd8deadSopenharmony_ci active. This is discussed in detail in issue 92 in the 1715bd8deadSopenharmony_ci ARB_vertex_program specification. 1725bd8deadSopenharmony_ci 1735bd8deadSopenharmony_ci RESOLUTION: We will follow ARB_vertex_program. 1745bd8deadSopenharmony_ci 1755bd8deadSopenharmony_ci 6) What should the initial value of the generic vertex attributes be? 1765bd8deadSopenharmony_ci 1775bd8deadSopenharmony_ci DISCUSSION: ARB_vertex_program leaves their initial values undefined. It 1785bd8deadSopenharmony_ci seems to make sense to do so, because of the undefined aliasing. In this 1795bd8deadSopenharmony_ci extension there is no aliasing among conventional and generic 1805bd8deadSopenharmony_ci attributes. Hence it could be desirable to define the initial values to 1815bd8deadSopenharmony_ci be (0, 0, 0, 1). 1825bd8deadSopenharmony_ci 1835bd8deadSopenharmony_ci RESOLUTION: The initial values are (0, 0, 0, 1). 1845bd8deadSopenharmony_ci 1855bd8deadSopenharmony_ci 7) Do generic attributes push and pop? 1865bd8deadSopenharmony_ci 1875bd8deadSopenharmony_ci DISCUSSION: There has been some concern that adding more state than 1885bd8deadSopenharmony_ci strictly necessary is a performance issue for applications that push and 1895bd8deadSopenharmony_ci pop a lot. Conventional attributes are pushed and popped, as well as 1905bd8deadSopenharmony_ci generic attributes, by ARB_vertex_program. 1915bd8deadSopenharmony_ci 1925bd8deadSopenharmony_ci RESOLUTION: YES, they are part of GL state, and such should push and pop 1935bd8deadSopenharmony_ci under the 'current' bit. Note that an OpenGL implementation could track 1945bd8deadSopenharmony_ci if a generic attribute has been set, and as long as it has not, never 1955bd8deadSopenharmony_ci push/pop that attribute. 1965bd8deadSopenharmony_ci 1975bd8deadSopenharmony_ci 8) How does user clipping work? 1985bd8deadSopenharmony_ci 1995bd8deadSopenharmony_ci DISCUSSION: The OpenGL Shading Language provides a gl_ClipVertex 2005bd8deadSopenharmony_ci built-in variable in the vertex shading language. This variable provides 2015bd8deadSopenharmony_ci a place for vertex shaders to specify a coordinate to be used by the 2025bd8deadSopenharmony_ci user clipping plane stage. The user must ensure that the clip vertex and 2035bd8deadSopenharmony_ci user clipping planes are defined in the same coordinate space. Note that 2045bd8deadSopenharmony_ci this is different than ARB_vertex_program, where user clipping is 2055bd8deadSopenharmony_ci ignored unless the position invariant option is enabled (where all 2065bd8deadSopenharmony_ci vertex transformation options are performed by the fixed functionality 2075bd8deadSopenharmony_ci pipeline). Here are some tips on how to use user clipping in a vertex 2085bd8deadSopenharmony_ci shader: 2095bd8deadSopenharmony_ci 2105bd8deadSopenharmony_ci 1) When using a traditional transform in a vertex shader, compute the 2115bd8deadSopenharmony_ci eye coordinates and store the result in gl_ClipVertex. 2125bd8deadSopenharmony_ci 2135bd8deadSopenharmony_ci 2) If clip planes are enabled with a vertex shader, gl_ClipVertex must 2145bd8deadSopenharmony_ci be written to, otherwise results will be undefined. 2155bd8deadSopenharmony_ci 2165bd8deadSopenharmony_ci 3) When doing object-space clipping, keep in mind that the clip planes 2175bd8deadSopenharmony_ci are automatically transformed to eye coordinates (see section 2.11 2185bd8deadSopenharmony_ci of the GL 1.4 spec). Use an identity modelView matrix to avoid this 2195bd8deadSopenharmony_ci transformation. 2205bd8deadSopenharmony_ci 2215bd8deadSopenharmony_ci RESOLUTION: Resolved. See also section 2.11. 2225bd8deadSopenharmony_ci 2235bd8deadSopenharmony_ci 9) Do we need a vertex shader point size enable? 2245bd8deadSopenharmony_ci 2255bd8deadSopenharmony_ci DISCUSSION: ARB_vertex_program provides an enable, 2265bd8deadSopenharmony_ci VERTEX_PROGRAM_POINT_SIZE_ARB. This extension uses the same enable. If 2275bd8deadSopenharmony_ci VERTEX_PROGRAM_POINT_SIZE mode is enabled, and a vertex shader is 2285bd8deadSopenharmony_ci active, then the point size is taken from the vertex shader's point size 2295bd8deadSopenharmony_ci result, otherwise it is taken from the PointSize command. The OpenGL 2305bd8deadSopenharmony_ci Shading Language provides a built-in gl_PointSize that a vertex shader 2315bd8deadSopenharmony_ci can write to, to specify the point size in pixels. If gl_PointSize is 2325bd8deadSopenharmony_ci not written while the point size mode is enabled then the point size 2335bd8deadSopenharmony_ci used in the rasterization stage is undefined. 2345bd8deadSopenharmony_ci 2355bd8deadSopenharmony_ci This point size enable is convenient for the majority of applications 2365bd8deadSopenharmony_ci who do not change the point size. Not setting the enable means the point 2375bd8deadSopenharmony_ci size is picked up automatically, instead of having to write a shader 2385bd8deadSopenharmony_ci which always outputs the same point size. 2395bd8deadSopenharmony_ci 2405bd8deadSopenharmony_ci RESOLUTION: Yes. 2415bd8deadSopenharmony_ci 2425bd8deadSopenharmony_ci 10) How to handle the color sum stage? 2435bd8deadSopenharmony_ci 2445bd8deadSopenharmony_ci DISCUSSION: It is the vertex shader's responsibility to write a primary 2455bd8deadSopenharmony_ci and secondary color into the appropriate built in varying variables, if 2465bd8deadSopenharmony_ci subsequent stages in the pipeline use these. Otherwise results are 2475bd8deadSopenharmony_ci undefined. Section 3.9 of the OpenGL 1.4 spec states that the color sum 2485bd8deadSopenharmony_ci stage is always applied when lighting is enabled, ignoring the value of 2495bd8deadSopenharmony_ci the COLOR_SUM enable bit. Should we take out this automatic enable when 2505bd8deadSopenharmony_ci lighting is enabled? 2515bd8deadSopenharmony_ci 2525bd8deadSopenharmony_ci RESOLUTION: This automatic enable will only have effect when no vertex 2535bd8deadSopenharmony_ci shader is active. This behavior is the same in ARB_vertex_program. 2545bd8deadSopenharmony_ci 2555bd8deadSopenharmony_ci 11) Does generic attribute zero also provoke (signal the end of a 2565bd8deadSopenharmony_ci vertex), or just the glVertex command? 2575bd8deadSopenharmony_ci 2585bd8deadSopenharmony_ci DISCUSSION: To be more compatible with ARB_vertex_program this would be 2595bd8deadSopenharmony_ci desirable. It may be that no attribute directly expresses a vertex 2605bd8deadSopenharmony_ci position. The shader may derive the position based on multiple 2615bd8deadSopenharmony_ci attributes, where there is no clear attribute that can be marked as "the 2625bd8deadSopenharmony_ci vertex". On the other hand, it is mandatory in a vertex shader to write 2635bd8deadSopenharmony_ci to gl_Vertex. Thus it makes some sense that the glVertex API has to be 2645bd8deadSopenharmony_ci used to signal the end of a vertex. 2655bd8deadSopenharmony_ci 2665bd8deadSopenharmony_ci RESOLUTION: Resolved. For compatibility reasons, attribute zero will 2675bd8deadSopenharmony_ci also provoke. 2685bd8deadSopenharmony_ci 2695bd8deadSopenharmony_ci 12) How to handle texture access from a vertex shader? 2705bd8deadSopenharmony_ci 2715bd8deadSopenharmony_ci DISCUSSION: The OpenGL Shading Language allows for texture access from a 2725bd8deadSopenharmony_ci vertex shader. What is the OpenGL support necessary to make that 2735bd8deadSopenharmony_ci actually happen? Two approaches seem feasible. 1) Virtualize the number 2745bd8deadSopenharmony_ci of texture image units available in OpenGL. Deprecate the concept of 2755bd8deadSopenharmony_ci binding a texture object to a texture image unit. Instead, bind a 2765bd8deadSopenharmony_ci texture object directly to a sampler. 2) A not so drastic approach that 2775bd8deadSopenharmony_ci makes a maximum number of texture image units available to a vertex 2785bd8deadSopenharmony_ci shader as well as to the fragment processing part of the OpenGL 2795bd8deadSopenharmony_ci pipeline. The sum of the available texture image units cannot exceed the 2805bd8deadSopenharmony_ci constant MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB. 2815bd8deadSopenharmony_ci 2825bd8deadSopenharmony_ci RESOLUTION: Option 2) is what is used in this specification. Option 1) 2835bd8deadSopenharmony_ci is a more invasive approach, and left for a future extension. 2845bd8deadSopenharmony_ci 2855bd8deadSopenharmony_ci This approach allows for two types of hardware. One where the hardware 2865bd8deadSopenharmony_ci resources to perform the functions associated with a texture image unit 2875bd8deadSopenharmony_ci are not shared between a vertex and fragment shader, and one type of 2885bd8deadSopenharmony_ci hardware where they are shared. The maximum number of texture image 2895bd8deadSopenharmony_ci units available to a vertex shader is 2905bd8deadSopenharmony_ci MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB. The maximum number of texture image 2915bd8deadSopenharmony_ci units available to the fragment stage of OpenGL is 2925bd8deadSopenharmony_ci MAX_TEXTURE_IMAGE_UNITS_ARB. Now consider, for example, an 2935bd8deadSopenharmony_ci implementation that supports up to 16 texture stages and shares its 2945bd8deadSopenharmony_ci texture mapping resources between the vertex shader and fragment shader. 2955bd8deadSopenharmony_ci For this implementation MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB, 2965bd8deadSopenharmony_ci MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB and MAX_TEXTURE_IMAGE_UNITS_ARB would 2975bd8deadSopenharmony_ci all be set to 16. A hardware implementation which does not share its 2985bd8deadSopenharmony_ci texture mapping resources, and who can support 2 texture stages for a 2995bd8deadSopenharmony_ci vertex shader and 16 texture stages for the fragment processing, would 3005bd8deadSopenharmony_ci set MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB to 18, 3015bd8deadSopenharmony_ci MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB to 2 and MAX_TEXTURE_IMAGE_UNITS_ARB 3025bd8deadSopenharmony_ci to 16. A vertex shader cannot use more than 3035bd8deadSopenharmony_ci MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB texture image units. The fragment 3045bd8deadSopenharmony_ci processing part of OpenGL cannot use more than 3055bd8deadSopenharmony_ci MAX_TEXTURE_IMAGE_UNITS_ARB texture image units. 3065bd8deadSopenharmony_ci 3075bd8deadSopenharmony_ci Both the vertex shader and fragment processing combined cannot use more 3085bd8deadSopenharmony_ci than MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB texture image units. If a 3095bd8deadSopenharmony_ci vertex shader and fragment processing part of OpenGL both use the same 3105bd8deadSopenharmony_ci texture image unit, then that counts as separate units against the above 3115bd8deadSopenharmony_ci mentioned limits. 3125bd8deadSopenharmony_ci 3135bd8deadSopenharmony_ci Automatic LOD calculation does not happen during vertex processing in a 3145bd8deadSopenharmony_ci vertex shader, hence there is no automatic selection of an image array 3155bd8deadSopenharmony_ci level. Minification or magnification of a texture map is controlled by a 3165bd8deadSopenharmony_ci LOD value passed as an argument in some of the built-in texture lookup 3175bd8deadSopenharmony_ci functions. These built-in texture lookup functions, defined in the 3185bd8deadSopenharmony_ci OpenGL Shading Language, come in two flavors. One set of lookup 3195bd8deadSopenharmony_ci functions that take a LOD value as an input, and one set that does not 3205bd8deadSopenharmony_ci take a LOD value. 3215bd8deadSopenharmony_ci 3225bd8deadSopenharmony_ci If the former set of functions is used, then the LOD value passed in is 3235bd8deadSopenharmony_ci used directly as the LOD value lambda' in section 3.8.8 equation 3.16 on 3245bd8deadSopenharmony_ci page 140 of the OpenGL 1.4 spec. This in turn defines lambda, which then 3255bd8deadSopenharmony_ci is used as usual to determine magnification or minification and, when 3265bd8deadSopenharmony_ci mipmapping, which mipmap array(s) to select. 3275bd8deadSopenharmony_ci 3285bd8deadSopenharmony_ci If the latter set of functions is used, then lambda, the result of 3295bd8deadSopenharmony_ci equation 3.16, is set to zero. This effectively means a texture object 3305bd8deadSopenharmony_ci is considered magnified, and only paragraph 3.8.9 applies. 3315bd8deadSopenharmony_ci 3325bd8deadSopenharmony_ci 13) Do we split a texture unit into a texture image unit and a texture 3335bd8deadSopenharmony_ci coordinate set? 3345bd8deadSopenharmony_ci 3355bd8deadSopenharmony_ci DISCUSSION: This is what ARB_fragment_program does, and 3365bd8deadSopenharmony_ci ARB_fragment_shader as well. The OpenGL Shading Language allows for 3375bd8deadSopenharmony_ci texture lookups in a vertex shader. This means that a vertex shader 3385bd8deadSopenharmony_ci should have access to a texture image unit (texture maps and associated 3395bd8deadSopenharmony_ci parameters). A vertex shader also has access to state stored with a 3405bd8deadSopenharmony_ci texture coordinate set, which encompasses vertex texture coordinate 3415bd8deadSopenharmony_ci attributes, as well as the texture matrix stack and texture generation 3425bd8deadSopenharmony_ci state. The number of supported texture image units and texture 3435bd8deadSopenharmony_ci coordinate sets is not necessarily the same on a particular 3445bd8deadSopenharmony_ci implementation. 3455bd8deadSopenharmony_ci 3465bd8deadSopenharmony_ci RESOLUTION: Yes 3475bd8deadSopenharmony_ci 3485bd8deadSopenharmony_ci 14) Do we need to specify different texture coordinate sets for a vertex 3495bd8deadSopenharmony_ci shader and fragment processing? 3505bd8deadSopenharmony_ci 3515bd8deadSopenharmony_ci DISCUSSION: So far there are MAX_TEXTURE_COORDS_ARB texture coordinate 3525bd8deadSopenharmony_ci sets. This constant is defined in ARB_fragment_program, and re-used in 3535bd8deadSopenharmony_ci ARB_fragment_shader as well as the OpenGL Shading Language (see built-in 3545bd8deadSopenharmony_ci constants, section 7.4). Only a vertex shader has access to vertex 3555bd8deadSopenharmony_ci texture coordinate attributes. But both an ARB vertex and fragment 3565bd8deadSopenharmony_ci shader has access to the other state associated with a texture 3575bd8deadSopenharmony_ci coordinate set. That state is texture generation and the texture matrix 3585bd8deadSopenharmony_ci stack. 3595bd8deadSopenharmony_ci 3605bd8deadSopenharmony_ci RESOLUTION: NO. 3615bd8deadSopenharmony_ci 3625bd8deadSopenharmony_ci 15) What is the minimum value for MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB? 3635bd8deadSopenharmony_ci 3645bd8deadSopenharmony_ci DISCUSSION: Should this be zero, or more? 3655bd8deadSopenharmony_ci 3665bd8deadSopenharmony_ci RESOLUTION: Resolved, zero. 3675bd8deadSopenharmony_ci 3685bd8deadSopenharmony_ci 16) Do we also need a built in function to guarantee position invariance 3695bd8deadSopenharmony_ci with respect to user clip planes? 3705bd8deadSopenharmony_ci 3715bd8deadSopenharmony_ci DISCUSSION: Issue 1 discusses invariance with respect to the vertex 3725bd8deadSopenharmony_ci position. A vertex shader however can also output coordinates used for 3735bd8deadSopenharmony_ci subsequent user clipping, by writing to gl_ClipVertex. In other words, 3745bd8deadSopenharmony_ci do we need something like gl_ClipVertex = ftransformClip()? 3755bd8deadSopenharmony_ci 3765bd8deadSopenharmony_ci RESOLUTION: NO, position invariance with respect to user clipping seems 3775bd8deadSopenharmony_ci like a rarely needed feature. The OpenGL Shading Language does not have 3785bd8deadSopenharmony_ci a ftransformClip() built-in function. If this functionality is ever 3795bd8deadSopenharmony_ci needed, it is easy to add later. 3805bd8deadSopenharmony_ci 3815bd8deadSopenharmony_ci 17) What happens to the point size when a vertex shader is active? 3825bd8deadSopenharmony_ci 3835bd8deadSopenharmony_ci DISCUSSION: The point size is taken from the built-in gl_PointSize when 3845bd8deadSopenharmony_ci VERTEX_PROGRAM_POINT_SIZE_ARB is enabled, but what to do with distance 3855bd8deadSopenharmony_ci attenuation and point fade (see Section 3.3)? 3865bd8deadSopenharmony_ci 3875bd8deadSopenharmony_ci RESOLUTION: Resolved. The vertex shader should compute distance 3885bd8deadSopenharmony_ci attenuation. Fixed function computes it as a function of, among others, 3895bd8deadSopenharmony_ci eyeZ. It is not required for a vertex shader to compute eyeZ, and the 3905bd8deadSopenharmony_ci fixed function eyeZ might have nothing to do with the vertex position 3915bd8deadSopenharmony_ci computed in the vertex shader. Point fade, however, should still be 3925bd8deadSopenharmony_ci fixed function. The vertex shader could compute a point fade, but it'll 3935bd8deadSopenharmony_ci produce incorrect results if the application issues the following 3945bd8deadSopenharmony_ci commands: 3955bd8deadSopenharmony_ci 3965bd8deadSopenharmony_ci glPolygonMode(GL_FRONT, GL_FILL); 3975bd8deadSopenharmony_ci glPolygonMode(GL_BACK, GL_POINT); 3985bd8deadSopenharmony_ci 3995bd8deadSopenharmony_ci In this case you would want to fade if a vertex belonged to a 4005bd8deadSopenharmony_ci back-facing triangle, but not if it could belong to a front-facing one. 4015bd8deadSopenharmony_ci 4025bd8deadSopenharmony_ci 18) What is the deal with range and precision of colors once output from 4035bd8deadSopenharmony_ci the vertex shader? 4045bd8deadSopenharmony_ci 4055bd8deadSopenharmony_ci DISCUSSION: Section 2.13.6 of the GL 1.4 spec specifies that all 4065bd8deadSopenharmony_ci components of both the primary and secondary colors be clamped to the 4075bd8deadSopenharmony_ci range [0,1]. Section 2.13.9 furthermore specifies that each color 4085bd8deadSopenharmony_ci component be converted to a fixed-point value with enough bits to 4095bd8deadSopenharmony_ci satisfy the frame buffer depth. Section 2.1.1 says that the maximum 4105bd8deadSopenharmony_ci representable magnitude of a floating-point number for colors must be at 4115bd8deadSopenharmony_ci least 2^10. 4125bd8deadSopenharmony_ci 4135bd8deadSopenharmony_ci It is desirable to bypass clamping of colors when an ARB_fragment_shader 4145bd8deadSopenharmony_ci shader is also active. It has utility to be able to exceed the range 4155bd8deadSopenharmony_ci [0,1] and deal with extended range colors in a fragment shader. 4165bd8deadSopenharmony_ci 4175bd8deadSopenharmony_ci Varying variables, including the built-in color variables, are declared 4185bd8deadSopenharmony_ci as floating point vectors in the OpenGL Shading Language, and 4195bd8deadSopenharmony_ci interpolated as floating-point values. It does not seem to make much 4205bd8deadSopenharmony_ci sense to specify a conversion to fixed-point after the ARB vertex shader 4215bd8deadSopenharmony_ci writes colors, then interpolate those fixed-point colors, then convert 4225bd8deadSopenharmony_ci the interpolated values back to floating point for input in the ARB 4235bd8deadSopenharmony_ci fragment shader. 4245bd8deadSopenharmony_ci 4255bd8deadSopenharmony_ci ARB_fragment_program leaves the primary and secondary colors as the only 4265bd8deadSopenharmony_ci varying variables that have less range (2^10) than any other varying. It 4275bd8deadSopenharmony_ci promoted texture coordinates to full citizens with a maximum 4285bd8deadSopenharmony_ci representable magnitude of at least 2^32. 4295bd8deadSopenharmony_ci 4305bd8deadSopenharmony_ci There are three cases to consider: 4315bd8deadSopenharmony_ci 4325bd8deadSopenharmony_ci 1) An ARB_vertex_shader shader writing colors that are consumed by an 4335bd8deadSopenharmony_ci ARB_fragment_shader shader. 4345bd8deadSopenharmony_ci 2) An ARB_vertex_shader shader writing colors that are consumed by an 4355bd8deadSopenharmony_ci ARB_fragment_program shader. 4365bd8deadSopenharmony_ci 3) An ARB_vertex_shader shader writing colors that are consumed by 4375bd8deadSopenharmony_ci fixed-function fragment processing. 4385bd8deadSopenharmony_ci 4395bd8deadSopenharmony_ci An argument can be made that a shader writer can bypass the clamping and 4405bd8deadSopenharmony_ci conversion to fixed-point by defining its own varying variables, and use 4415bd8deadSopenharmony_ci that to interpolate colors. It can then use the built-in gl_FrontFacing 4425bd8deadSopenharmony_ci in a fragment shader for front or back face color selection. This is 4435bd8deadSopenharmony_ci certainly true, but it bypasses the (fixed-function) front and back face 4445bd8deadSopenharmony_ci color selection, which happens in a stage after the vertex shader. This 4455bd8deadSopenharmony_ci front/back face selection stage can only be used when writing to the 4465bd8deadSopenharmony_ci vertex shader built-in gl_FrontColor, gl_BackColor, 4475bd8deadSopenharmony_ci gl_FrontSecondaryColor and gl_BackSecondaryColor. 4485bd8deadSopenharmony_ci 4495bd8deadSopenharmony_ci RESOLUTION: We anticipate future extensions will generalize the final 4505bd8deadSopenharmony_ci color-processing clamp with an enable/disable clamp. Therefore, this 4515bd8deadSopenharmony_ci specification will leave the final color clamp and conversion to 4525bd8deadSopenharmony_ci fixed-point in place for gl_FrontColor, gl_FrontSecondaryColor, 4535bd8deadSopenharmony_ci gl_BackColor, and gl_BackSecondaryColor. 4545bd8deadSopenharmony_ci 4555bd8deadSopenharmony_ci 19) How do I get a list of all attributes and their types used by a 4565bd8deadSopenharmony_ci shader and when do I bind generic vertex attributes? 4575bd8deadSopenharmony_ci 4585bd8deadSopenharmony_ci DISCUSSION: GetActiveAttribARB will return the name of an attribute and 4595bd8deadSopenharmony_ci its type declared and actually used in the shader, as determined by the 4605bd8deadSopenharmony_ci compiler and linker. Looping over all attributes and calling 4615bd8deadSopenharmony_ci GetActiveAttribARB will generate the list of attribute names and types 4625bd8deadSopenharmony_ci used in a shader. This list is called the active attributes list. 4635bd8deadSopenharmony_ci GetActiveAttribARB can be called after a link attempt. It is not 4645bd8deadSopenharmony_ci necessary for the link to have succeeded. After all, one of the reasons 4655bd8deadSopenharmony_ci the link failed could be that there are too many active attributes. It 4665bd8deadSopenharmony_ci is not required to call BindAttribLocationARB before issuing 4675bd8deadSopenharmony_ci GetActiveAttribARB. BindAttributeLocationARB can be called any time. In 4685bd8deadSopenharmony_ci order to have a BindAttribLocationARB command take effect, the program 4695bd8deadSopenharmony_ci object will have to be (re)linked. Thus the order of commands to get the 4705bd8deadSopenharmony_ci list of active attributes could be: Link the program object, call 4715bd8deadSopenharmony_ci GetActiveAttribARB as many times as needed, call BindAttribLocationARB 4725bd8deadSopenharmony_ci one or more times, then call link again. 4735bd8deadSopenharmony_ci 4745bd8deadSopenharmony_ci It is allowed to issue BindAttribLocationARB before any vertex shader 4755bd8deadSopenharmony_ci objects are attached to a program object. Hence it is allowed to bind 4765bd8deadSopenharmony_ci any name to a location, including a name that is never used as an 4775bd8deadSopenharmony_ci attribute in any vertex shader object. 4785bd8deadSopenharmony_ci 4795bd8deadSopenharmony_ci RESOLUTION: Resolved, call GetActiveAttribARB. 4805bd8deadSopenharmony_ci 4815bd8deadSopenharmony_ci 20) Who assigns vertex attribute variable names to indices used in the 4825bd8deadSopenharmony_ci VertexAttrib*ARB commands? 4835bd8deadSopenharmony_ci 4845bd8deadSopenharmony_ci DISCUSSION: Both the GL and the application can do this. The linker will 4855bd8deadSopenharmony_ci assign indices to vertex attributes declared in a vertex shader. These 4865bd8deadSopenharmony_ci values can be queried by the application and used to load values for the 4875bd8deadSopenharmony_ci generic vertex attributes. Alternatively the application can override 4885bd8deadSopenharmony_ci this assignment, and bind attribute variable names to any generic vertex 4895bd8deadSopenharmony_ci attribute index of their choice, within the range 0 to 4905bd8deadSopenharmony_ci MAX_VERTEX_ATTRIBS_ARB. An application would have to do this when 4915bd8deadSopenharmony_ci building a display list, for example. In this case it is possible to 4925bd8deadSopenharmony_ci generate the display list before the program object has even been 4935bd8deadSopenharmony_ci created. 4945bd8deadSopenharmony_ci 4955bd8deadSopenharmony_ci Only indices for generic attributes can be queried, or set. Conventional 4965bd8deadSopenharmony_ci attributes are handled by the GL, and guaranteed to not alias with 4975bd8deadSopenharmony_ci generic attributes. 4985bd8deadSopenharmony_ci 4995bd8deadSopenharmony_ci RESOLUTION: Both the GL and the application. 5005bd8deadSopenharmony_ci 5015bd8deadSopenharmony_ci 21) How should this extension handle changes to material state within 5025bd8deadSopenharmony_ci Begin/End? 5035bd8deadSopenharmony_ci 5045bd8deadSopenharmony_ci DISCUSSION: Supporting per-vertex material properties places additional 5055bd8deadSopenharmony_ci pressure on the number of per-vertex bindings an OpenGL implementation 5065bd8deadSopenharmony_ci can support, which already is a scarce resource. 5075bd8deadSopenharmony_ci 5085bd8deadSopenharmony_ci RESOLUTION: Materials are declared as uniforms in the OpenGL Shading 5095bd8deadSopenharmony_ci Language. Any changes to the material properties inside a Begin/End 5105bd8deadSopenharmony_ci through Material commands, or indirectly through ColorMaterial and Color 5115bd8deadSopenharmony_ci commands, are not guaranteed to actually update material state until the 5125bd8deadSopenharmony_ci next End command. At that point, all material property state is 5135bd8deadSopenharmony_ci guaranteed to be updated. 5145bd8deadSopenharmony_ci 5155bd8deadSopenharmony_ci In practice, material properties are usually not changed within 5165bd8deadSopenharmony_ci Begin/End. Applications needing to change material properties inside a 5175bd8deadSopenharmony_ci Begin/End in a vertex shader can work around this limitation by storing 5185bd8deadSopenharmony_ci the color in a conventional or generic vertex attribute and modifying 5195bd8deadSopenharmony_ci the vertex shader accordingly. 5205bd8deadSopenharmony_ci 5215bd8deadSopenharmony_ci 22) What space are gl_Position and gl_ClipVertex in? 5225bd8deadSopenharmony_ci 5235bd8deadSopenharmony_ci DISCUSSION: The GL treats the values in the built-in output variable 5245bd8deadSopenharmony_ci gl_Position as being in clip space, for the purpose of clipping against 5255bd8deadSopenharmony_ci the clip volume. See Section 2.11 of the OpenGL 1.4 specification. The 5265bd8deadSopenharmony_ci GL treats the values in the (optional) built-in output variable 5275bd8deadSopenharmony_ci gl_ClipVertex as being in eye-space for clipping against a 5285bd8deadSopenharmony_ci client-defined clip plane. 5295bd8deadSopenharmony_ci 5305bd8deadSopenharmony_ci RESOLUTION: clip-space and eye-space respectively. 5315bd8deadSopenharmony_ci 5325bd8deadSopenharmony_ci 23) What texture operations are not affected by a vertex shader 5335bd8deadSopenharmony_ci performing a texture lookup? 5345bd8deadSopenharmony_ci 5355bd8deadSopenharmony_ci RESOLUTION: Whether or not a vertex shader is active, the following 5365bd8deadSopenharmony_ci operations still behave as specified: 5375bd8deadSopenharmony_ci 5385bd8deadSopenharmony_ci * texture image specification (pp. 119-128) 5395bd8deadSopenharmony_ci * alternate texture image specification (pp. 128-132) 5405bd8deadSopenharmony_ci * compressed texture image specification (pp. 132-135) 5415bd8deadSopenharmony_ci * texture parameters behave as specified even when a texture is 5425bd8deadSopenharmony_ci accessed from within a vertex shader (pp. 135-147) 5435bd8deadSopenharmony_ci * texture state and proxy state (pp. 148-149) 5445bd8deadSopenharmony_ci * texture object specification (pp. 149-152) 5455bd8deadSopenharmony_ci * texture comparison modes (p. 157) 5465bd8deadSopenharmony_ci 5475bd8deadSopenharmony_ciNew Procedures and Functions 5485bd8deadSopenharmony_ci 5495bd8deadSopenharmony_ci void VertexAttrib1fARB(uint index, float v0) 5505bd8deadSopenharmony_ci void VertexAttrib1sARB(uint index, short v0) 5515bd8deadSopenharmony_ci void VertexAttrib1dARB(uint index, double v0) 5525bd8deadSopenharmony_ci void VertexAttrib2fARB(uint index, float v0, float v1) 5535bd8deadSopenharmony_ci void VertexAttrib2sARB(uint index, short v0, short v1) 5545bd8deadSopenharmony_ci void VertexAttrib2dARB(uint index, double v0, double v1) 5555bd8deadSopenharmony_ci void VertexAttrib3fARB(uint index, float v0, float v1, float v2) 5565bd8deadSopenharmony_ci void VertexAttrib3sARB(uint index, short v0, short v1, short v2) 5575bd8deadSopenharmony_ci void VertexAttrib3dARB(uint index, double v0, double v1, double v2) 5585bd8deadSopenharmony_ci void VertexAttrib4fARB(uint index, float v0, float v1, float v2, float v3) 5595bd8deadSopenharmony_ci void VertexAttrib4sARB(uint index, short v0, short v1, short v2, short v3) 5605bd8deadSopenharmony_ci void VertexAttrib4dARB(uint index, double v0, double v1, double v2, double v3) 5615bd8deadSopenharmony_ci void VertexAttrib4NubARB(uint index, ubyte x, ubyte y, ubyte z, ubyte w) 5625bd8deadSopenharmony_ci 5635bd8deadSopenharmony_ci void VertexAttrib1fvARB(uint index, const float *v) 5645bd8deadSopenharmony_ci void VertexAttrib1svARB(uint index, const short *v) 5655bd8deadSopenharmony_ci void VertexAttrib1dvARB(uint index, const double *v) 5665bd8deadSopenharmony_ci void VertexAttrib2fvARB(uint index, const float *v) 5675bd8deadSopenharmony_ci void VertexAttrib2svARB(uint index, const short *v) 5685bd8deadSopenharmony_ci void VertexAttrib2dvARB(uint index, const double *v) 5695bd8deadSopenharmony_ci void VertexAttrib3fvARB(uint index, const float *v) 5705bd8deadSopenharmony_ci void VertexAttrib3svARB(uint index, const short *v) 5715bd8deadSopenharmony_ci void VertexAttrib3dvARB(uint index, const double *v) 5725bd8deadSopenharmony_ci void VertexAttrib4fvARB(uint index, const float *v) 5735bd8deadSopenharmony_ci void VertexAttrib4svARB(uint index, const short *v) 5745bd8deadSopenharmony_ci void VertexAttrib4dvARB(uint index, const double *v) 5755bd8deadSopenharmony_ci void VertexAttrib4ivARB(uint index, const int *v) 5765bd8deadSopenharmony_ci void VertexAttrib4bvARB(uint index, const byte *v) 5775bd8deadSopenharmony_ci 5785bd8deadSopenharmony_ci void VertexAttrib4ubvARB(uint index, const ubyte *v) 5795bd8deadSopenharmony_ci void VertexAttrib4usvARB(uint index, const ushort *v) 5805bd8deadSopenharmony_ci void VertexAttrib4uivARB(uint index, const uint *v) 5815bd8deadSopenharmony_ci 5825bd8deadSopenharmony_ci void VertexAttrib4NbvARB(uint index, const byte *v) 5835bd8deadSopenharmony_ci void VertexAttrib4NsvARB(uint index, const short *v) 5845bd8deadSopenharmony_ci void VertexAttrib4NivARB(uint index, const int *v) 5855bd8deadSopenharmony_ci void VertexAttrib4NubvARB(uint index, const ubyte *v) 5865bd8deadSopenharmony_ci void VertexAttrib4NusvARB(uint index, const ushort *v) 5875bd8deadSopenharmony_ci void VertexAttrib4NuivARB(uint index, const uint *v) 5885bd8deadSopenharmony_ci 5895bd8deadSopenharmony_ci void VertexAttribPointerARB(uint index, int size, enum type, boolean normalized, 5905bd8deadSopenharmony_ci sizei stride, const void *pointer) 5915bd8deadSopenharmony_ci 5925bd8deadSopenharmony_ci void EnableVertexAttribArrayARB(uint index) 5935bd8deadSopenharmony_ci void DisableVertexAttribArrayARB(uint index) 5945bd8deadSopenharmony_ci 5955bd8deadSopenharmony_ci void BindAttribLocationARB(handleARB programObj, uint index, const charARB *name) 5965bd8deadSopenharmony_ci 5975bd8deadSopenharmony_ci void GetActiveAttribARB(handleARB programObj, uint index, sizei maxLength, 5985bd8deadSopenharmony_ci sizei *length, int *size, enum *type, charARB *name) 5995bd8deadSopenharmony_ci 6005bd8deadSopenharmony_ci GLint GetAttribLocationARB(handleARB programObj, const charARB *name) 6015bd8deadSopenharmony_ci 6025bd8deadSopenharmony_ci void GetVertexAttribdvARB(uint index, enum pname, double *params) 6035bd8deadSopenharmony_ci void GetVertexAttribfvARB(uint index, enum pname, float *params) 6045bd8deadSopenharmony_ci void GetVertexAttribivARB(uint index, enum pname, int *params) 6055bd8deadSopenharmony_ci void GetVertexAttribPointervARB(uint index, enum pname, void **pointer) 6065bd8deadSopenharmony_ci 6075bd8deadSopenharmony_ciNew Tokens 6085bd8deadSopenharmony_ci 6095bd8deadSopenharmony_ci Accepted by the <shaderType> argument of CreateShaderObjectARB and 6105bd8deadSopenharmony_ci returned by the <params> parameter of GetObjectParameter{if}vARB: 6115bd8deadSopenharmony_ci 6125bd8deadSopenharmony_ci VERTEX_SHADER_ARB 0x8B31 6135bd8deadSopenharmony_ci 6145bd8deadSopenharmony_ci Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, 6155bd8deadSopenharmony_ci GetFloatv, and GetDoublev: 6165bd8deadSopenharmony_ci 6175bd8deadSopenharmony_ci MAX_VERTEX_UNIFORM_COMPONENTS_ARB 0x8B4A 6185bd8deadSopenharmony_ci MAX_VARYING_FLOATS_ARB 0x8B4B 6195bd8deadSopenharmony_ci MAX_VERTEX_ATTRIBS_ARB 0x8869 6205bd8deadSopenharmony_ci MAX_TEXTURE_IMAGE_UNITS_ARB 0x8872 6215bd8deadSopenharmony_ci MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB 0x8B4C 6225bd8deadSopenharmony_ci MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB 0x8B4D 6235bd8deadSopenharmony_ci MAX_TEXTURE_COORDS_ARB 0x8871 6245bd8deadSopenharmony_ci 6255bd8deadSopenharmony_ci Accepted by the <cap> parameter of Disable, Enable, and IsEnabled, and 6265bd8deadSopenharmony_ci by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, and 6275bd8deadSopenharmony_ci GetDoublev: 6285bd8deadSopenharmony_ci 6295bd8deadSopenharmony_ci VERTEX_PROGRAM_POINT_SIZE_ARB 0x8642 6305bd8deadSopenharmony_ci VERTEX_PROGRAM_TWO_SIDE_ARB 0x8643 6315bd8deadSopenharmony_ci 6325bd8deadSopenharmony_ci Accepted by the <pname> parameter GetObjectParameter{if}vARB: 6335bd8deadSopenharmony_ci 6345bd8deadSopenharmony_ci OBJECT_ACTIVE_ATTRIBUTES_ARB 0x8B89 6355bd8deadSopenharmony_ci OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB 0x8B8A 6365bd8deadSopenharmony_ci 6375bd8deadSopenharmony_ci Accepted by the <pname> parameter of GetVertexAttrib{dfi}vARB: 6385bd8deadSopenharmony_ci 6395bd8deadSopenharmony_ci VERTEX_ATTRIB_ARRAY_ENABLED_ARB 0x8622 6405bd8deadSopenharmony_ci VERTEX_ATTRIB_ARRAY_SIZE_ARB 0x8623 6415bd8deadSopenharmony_ci VERTEX_ATTRIB_ARRAY_STRIDE_ARB 0x8624 6425bd8deadSopenharmony_ci VERTEX_ATTRIB_ARRAY_TYPE_ARB 0x8625 6435bd8deadSopenharmony_ci VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB 0x886A 6445bd8deadSopenharmony_ci CURRENT_VERTEX_ATTRIB_ARB 0x8626 6455bd8deadSopenharmony_ci 6465bd8deadSopenharmony_ci Accepted by the <pname> parameter of GetVertexAttribPointervARB: 6475bd8deadSopenharmony_ci 6485bd8deadSopenharmony_ci VERTEX_ATTRIB_ARRAY_POINTER_ARB 0x8645 6495bd8deadSopenharmony_ci 6505bd8deadSopenharmony_ci Returned by the <type> parameter of GetActiveAttribARB: 6515bd8deadSopenharmony_ci 6525bd8deadSopenharmony_ci FLOAT 0x1406 6535bd8deadSopenharmony_ci FLOAT_VEC2_ARB 0x8B50 6545bd8deadSopenharmony_ci FLOAT_VEC3_ARB 0x8B51 6555bd8deadSopenharmony_ci FLOAT_VEC4_ARB 0x8B52 6565bd8deadSopenharmony_ci FLOAT_MAT2_ARB 0x8B5A 6575bd8deadSopenharmony_ci FLOAT_MAT3_ARB 0x8B5B 6585bd8deadSopenharmony_ci FLOAT_MAT4_ARB 0x8B5C 6595bd8deadSopenharmony_ci 6605bd8deadSopenharmony_ciAdditions to Chapter 2 of the OpenGL 1.4 Specification (OpenGL Operation) 6615bd8deadSopenharmony_ci 6625bd8deadSopenharmony_ci Modify Section 2.1.1, Floating-Point Computation (p. 6) 6635bd8deadSopenharmony_ci 6645bd8deadSopenharmony_ci (modify first paragraph, p. 6) ... are accurate to about 1 part in 10^5. 6655bd8deadSopenharmony_ci The maximum representable magnitude of a floating-point number used to 6665bd8deadSopenharmony_ci represent positional, normal or texture coordinates must be at least 6675bd8deadSopenharmony_ci 2^32. The maximum representable magnitude for colors must be at least 6685bd8deadSopenharmony_ci 2^10. The maximum representable magnitude for all other floating-point 6695bd8deadSopenharmony_ci values must be at least 2^32. 6705bd8deadSopenharmony_ci 6715bd8deadSopenharmony_ci Modify Section 2.6, Begin/End Paradigm (p. 12) 6725bd8deadSopenharmony_ci 6735bd8deadSopenharmony_ci (modify last paragraph, p. 12) Each vertex is specified with two, three, 6745bd8deadSopenharmony_ci or four coordinates. In addition, a current normal, multiple current 6755bd8deadSopenharmony_ci texture coordinate sets, multiple current generic vertex attributes, 6765bd8deadSopenharmony_ci current color ... Generic vertex attributes can be accessed from within 6775bd8deadSopenharmony_ci vertex shaders (section 2.15) and used to compute values for consumption 6785bd8deadSopenharmony_ci by later processing stages. 6795bd8deadSopenharmony_ci 6805bd8deadSopenharmony_ci Modify Section 2.6.3, GL Commands within Begin/End (p. 19) 6815bd8deadSopenharmony_ci 6825bd8deadSopenharmony_ci (modify first paragraph of section, p. 19) The only GL commands that are 6835bd8deadSopenharmony_ci allowed within any Begin/End pairs are the commands for specifying 6845bd8deadSopenharmony_ci vertex coordinates, vertex colors, normal coordinates, texture 6855bd8deadSopenharmony_ci coordinates, generic vertex attributes and fog coordinates (Vertex, 6865bd8deadSopenharmony_ci Color, SecondaryColor, Index, Normal, TexCoord and MultiTexCoord, 6875bd8deadSopenharmony_ci VertexAttrib*ARB, FogCoord), ... 6885bd8deadSopenharmony_ci 6895bd8deadSopenharmony_ci Modify Section 2.7, Vertex Specification (p. 19) 6905bd8deadSopenharmony_ci 6915bd8deadSopenharmony_ci (modify second paragraph, p. 20) Implementations support more than one 6925bd8deadSopenharmony_ci set of texture coordinates. The commands 6935bd8deadSopenharmony_ci 6945bd8deadSopenharmony_ci void MultiTexCoord{1234}{sifd}(enum texture, T coords) 6955bd8deadSopenharmony_ci void MultiTexCoord{1234}{sifd}v(enum texture, T coords) 6965bd8deadSopenharmony_ci 6975bd8deadSopenharmony_ci take the coordinate set to be modified as the <texture> parameter. 6985bd8deadSopenharmony_ci <texture> is a symbolic constant of the form TEXTUREi, indicating that 6995bd8deadSopenharmony_ci texture coordinate set i is to be modified. The constants obey TEXTUREi 7005bd8deadSopenharmony_ci = TEXTURE0 + i (i is in the range 0 to k-1, where k is the 7015bd8deadSopenharmony_ci implementation-dependent number of texture coordinate sets defined by 7025bd8deadSopenharmony_ci MAX_TEXTURE_COORDS_ARB). 7035bd8deadSopenharmony_ci 7045bd8deadSopenharmony_ci (remove the "Finally" from the second paragraph on p. 21) 7055bd8deadSopenharmony_ci 7065bd8deadSopenharmony_ci (add the following prior to the last paragraph in the section, p. 21) 7075bd8deadSopenharmony_ci 7085bd8deadSopenharmony_ci Vertex shaders (see Section 2.15) can be written to access an array of 7095bd8deadSopenharmony_ci 4-component generic vertex attributes in addition to the conventional 7105bd8deadSopenharmony_ci attributes specified previously. The first slot of this array is 7115bd8deadSopenharmony_ci numbered 0, and the length of the array is specified by the 7125bd8deadSopenharmony_ci implementation-dependent constant MAX_VERTEX_ATTRIBS_ARB. 7135bd8deadSopenharmony_ci 7145bd8deadSopenharmony_ci The commands 7155bd8deadSopenharmony_ci 7165bd8deadSopenharmony_ci void VertexAttrib{1234}{sfd}ARB(uint index, T values) 7175bd8deadSopenharmony_ci void VertexAttrib{123}{sfd}vARB(uint index, T values) 7185bd8deadSopenharmony_ci void VertexAttrib4{bsifd ubusui}vARB(uint index, T values) 7195bd8deadSopenharmony_ci 7205bd8deadSopenharmony_ci can be used to load the given value(s) into the generic attribute at 7215bd8deadSopenharmony_ci slot <index>, whose components are named <x>, <y>, <z>, and <w>. The 7225bd8deadSopenharmony_ci VertexAttrib1*ARB family of commands sets the <x> coordinate to the 7235bd8deadSopenharmony_ci provided single argument while setting <y> and <z> to 0 and <w> to 1. 7245bd8deadSopenharmony_ci Similarly, VertexAttrib2*ARB commands set <x> and <y> to the specified 7255bd8deadSopenharmony_ci values, <z> to 0 and <w> to 1; VertexAttrib3*ARB commands set <x>, <y>, 7265bd8deadSopenharmony_ci and <z>, with <w> set to 1, and VertexAttrib4*ARB commands set all four 7275bd8deadSopenharmony_ci coordinates. The error INVALID_VALUE is generated if <index> is greater 7285bd8deadSopenharmony_ci than or equal to MAX_VERTEX_ATTRIBS_ARB. 7295bd8deadSopenharmony_ci 7305bd8deadSopenharmony_ci The commands 7315bd8deadSopenharmony_ci 7325bd8deadSopenharmony_ci void VertexAttrib4NubARB(uint index, T values) 7335bd8deadSopenharmony_ci void VertexAttrib4N{bsi ubusui}vARB(uint index, T values) 7345bd8deadSopenharmony_ci 7355bd8deadSopenharmony_ci also specify vertex attributes with fixed-point coordinates that are 7365bd8deadSopenharmony_ci scaled to a normalized range, according to Table 2.6. 7375bd8deadSopenharmony_ci 7385bd8deadSopenharmony_ci The VertexAttrib*ARB entry points defined earlier can also be used to 7395bd8deadSopenharmony_ci load attributes declared as a 2x2, 3x3 or 4x4 matrix in a vertex shader. 7405bd8deadSopenharmony_ci Each column of a matrix takes up one generic 4-component attribute slot 7415bd8deadSopenharmony_ci out of the MAX_VERTEX_ATTRIBS_ARB available slots. Matrices are loaded 7425bd8deadSopenharmony_ci into these slots in column major order. Matrix columns need to be loaded 7435bd8deadSopenharmony_ci in increasing slot numbers. 7445bd8deadSopenharmony_ci 7455bd8deadSopenharmony_ci Setting generic vertex attribute zero specifies a vertex; the four 7465bd8deadSopenharmony_ci vertex coordinates are taken from the values of attribute zero. A 7475bd8deadSopenharmony_ci Vertex2, Vertex3, or Vertex4 command is completely equivalent to the 7485bd8deadSopenharmony_ci corresponding VertexAttrib*ARB command with an index of zero. Setting 7495bd8deadSopenharmony_ci any other generic vertex attribute updates the current values of the 7505bd8deadSopenharmony_ci attribute. There are no current values for vertex attribute zero. 7515bd8deadSopenharmony_ci 7525bd8deadSopenharmony_ci There is no aliasing among generic attributes and conventional 7535bd8deadSopenharmony_ci attributes. In other words, an application can set all 7545bd8deadSopenharmony_ci MAX_VERTEX_ATTRIBS_ARB generic attributes and all conventional 7555bd8deadSopenharmony_ci attributes without fear of one particular attribute overwriting the 7565bd8deadSopenharmony_ci value of another attribute. 7575bd8deadSopenharmony_ci 7585bd8deadSopenharmony_ci (Change the first half of the last paragraph in the section, p. 21, to) 7595bd8deadSopenharmony_ci 7605bd8deadSopenharmony_ci The state required to support vertex specification consists of four 7615bd8deadSopenharmony_ci floating-point numbers per texture coordinate set to store the current 7625bd8deadSopenharmony_ci texture coordinates s, t, r, and q, three floating-point numbers to 7635bd8deadSopenharmony_ci store the three coordinates of the current normal, one floating-point 7645bd8deadSopenharmony_ci number to store the current fog coordinate, four floating- point values 7655bd8deadSopenharmony_ci to store the current RGBA color, four floating-point values to store the 7665bd8deadSopenharmony_ci current RGBA secondary color, one floating-point value to store the 7675bd8deadSopenharmony_ci current color index, and MAX_VERTEX_ATTRIBS_ARB-1 four-component 7685bd8deadSopenharmony_ci floating-point vectors for generic vertex attributes. There is no notion 7695bd8deadSopenharmony_ci of a current vertex, so no state is devoted to vertex coordinates or 7705bd8deadSopenharmony_ci generic vertex attribute zero. The initial texture coordinates are 7715bd8deadSopenharmony_ci (S,T,R,Q) = (0,0,0,1) for each texture coordinate set. The initial 7725bd8deadSopenharmony_ci current normal has coordinates (0,0,1). The initial fog coordinate is 7735bd8deadSopenharmony_ci zero. The initial RGBA color is (R,G,B,A) = (1,1,1,1) and the initial 7745bd8deadSopenharmony_ci RGBA secondary color is (0, 0, 0, 1). The initial color index is 1. The 7755bd8deadSopenharmony_ci initial values for all generic vertex attributes are (0, 0, 0, 1). 7765bd8deadSopenharmony_ci 7775bd8deadSopenharmony_ci Modify Section 2.8, Vertex Arrays (p. 23) 7785bd8deadSopenharmony_ci 7795bd8deadSopenharmony_ci (modify first paragraph of section, p.23) The vertex specification 7805bd8deadSopenharmony_ci commands described in section 2.7 accept data in almost any format, but 7815bd8deadSopenharmony_ci their use requires many command executions to specify even simple 7825bd8deadSopenharmony_ci geometry. Vertex data may also be placed into arrays that are stored in 7835bd8deadSopenharmony_ci the client's address space. Blocks of data in these arrays may then be 7845bd8deadSopenharmony_ci used to specify multiple geometric primitives through the execution of a 7855bd8deadSopenharmony_ci single GL command. The client may specify up to 7 plus the values of 7865bd8deadSopenharmony_ci MAX_TEXTURE_COORDS_ARB and MAX_VERTEX_ATTRIBS_ARB arrays: One each to 7875bd8deadSopenharmony_ci store vertex coordinates, edge flags, colors, secondary colors, color 7885bd8deadSopenharmony_ci indices, normals, fog coordinates, one or more texture coordinate sets, 7895bd8deadSopenharmony_ci and one or more generic vertex attributes. 7905bd8deadSopenharmony_ci 7915bd8deadSopenharmony_ci The commands 7925bd8deadSopenharmony_ci 7935bd8deadSopenharmony_ci ... 7945bd8deadSopenharmony_ci 7955bd8deadSopenharmony_ci void VertexAttribPointerARB(uint index, int size, enum type, 7965bd8deadSopenharmony_ci boolean normalized, sizei stride, 7975bd8deadSopenharmony_ci const void *pointer) 7985bd8deadSopenharmony_ci 7995bd8deadSopenharmony_ci describe the locations and organizations... 8005bd8deadSopenharmony_ci 8015bd8deadSopenharmony_ci (add after the first paragraph, p.24) The <index> parameter in the 8025bd8deadSopenharmony_ci VertexAttribPointerARB command identifies the generic vertex attribute 8035bd8deadSopenharmony_ci array being described. The error INVALID_VALUE is generated if <index> 8045bd8deadSopenharmony_ci is greater than or equal to MAX_VERTEX_ATTRIBS_ARB. The <normalized> 8055bd8deadSopenharmony_ci parameter in the VertexAttribPointerARB command identifies whether 8065bd8deadSopenharmony_ci fixed-point types should be normalized when converted to floating-point. 8075bd8deadSopenharmony_ci If <normalized> is TRUE, fixed-point data are converted as specified in 8085bd8deadSopenharmony_ci Table 2.6; otherwise, the fixed-point values are converted directly. 8095bd8deadSopenharmony_ci 8105bd8deadSopenharmony_ci (add to the beginning of the page, p. 25) An individual generic vertex 8115bd8deadSopenharmony_ci attribute array is enabled or disabled by calling one of 8125bd8deadSopenharmony_ci 8135bd8deadSopenharmony_ci void EnableVertexAttribArrayARB(uint index) 8145bd8deadSopenharmony_ci void DisableVertexAttribArrayARB(uint index) 8155bd8deadSopenharmony_ci 8165bd8deadSopenharmony_ci where <index> identifies the generic vertex attribute array to enable or 8175bd8deadSopenharmony_ci disable. The error INVALID_VALUE is generated if <index> is greater than 8185bd8deadSopenharmony_ci or equal to MAX_VERTEX_ATTRIBS_ARB. 8195bd8deadSopenharmony_ci 8205bd8deadSopenharmony_ci (modify Table 2.4, p.24) 8215bd8deadSopenharmony_ci 8225bd8deadSopenharmony_ci Normal 8235bd8deadSopenharmony_ci Command Sizes ized? Types 8245bd8deadSopenharmony_ci ---------------------- ------- ------ --------------------------- 8255bd8deadSopenharmony_ci VertexPointer 2,3,4 no short, int, float, double 8265bd8deadSopenharmony_ci NormalPointer 3 yes byte, short, int, float, 8275bd8deadSopenharmony_ci double 8285bd8deadSopenharmony_ci ColorPointer 3,4 yes byte, ubyte, short, ushort, 8295bd8deadSopenharmony_ci int, uint, float, double 8305bd8deadSopenharmony_ci SecondaryColorPointer 3 yes byte, ubyte, short, ushort, 8315bd8deadSopenharmony_ci int, uint, float, double 8325bd8deadSopenharmony_ci IndexPointer 1 no ubyte, short, int, float, 8335bd8deadSopenharmony_ci double 8345bd8deadSopenharmony_ci FogCoordPointer 1 n/a float, double 8355bd8deadSopenharmony_ci TexCoordPointer 1,2,3,4 no short, int, float, double 8365bd8deadSopenharmony_ci EdgeFlagPointer 1 no boolean 8375bd8deadSopenharmony_ci VertexAttribPointerARB 1,2,3,4 flag byte, ubyte, short, ushort, 8385bd8deadSopenharmony_ci int, uint, float, double 8395bd8deadSopenharmony_ci 8405bd8deadSopenharmony_ci Table 2.4: Vertex array sizes (values per vertex) and data types. The 8415bd8deadSopenharmony_ci "normalized" column indicates whether fixed-point types are accepted 8425bd8deadSopenharmony_ci directly or normalized to [0,1] (for unsigned types) or [-1,1] (for 8435bd8deadSopenharmony_ci signed types). For generic vertex attributes, fixed-point data are 8445bd8deadSopenharmony_ci normalized if and only if the <normalized> flag is set. 8455bd8deadSopenharmony_ci 8465bd8deadSopenharmony_ci (modify first paragraph, p. 25) The command 8475bd8deadSopenharmony_ci 8485bd8deadSopenharmony_ci void ClientActiveTexture(enum texture) 8495bd8deadSopenharmony_ci 8505bd8deadSopenharmony_ci is used to select the vertex array client state parameters to be 8515bd8deadSopenharmony_ci modified by the TexCoordPointer command and the array affected by 8525bd8deadSopenharmony_ci EnableClientState and DisableClientState with parameter 8535bd8deadSopenharmony_ci TEXTURE_COORD_ARRAY. This command sets the client state variable 8545bd8deadSopenharmony_ci CLIENT_ACTIVE_TEXTURE. Each texture coordinate set has a client state 8555bd8deadSopenharmony_ci vector which is selected when this command is invoked. This state vector 8565bd8deadSopenharmony_ci includes the vertex array state. This call also selects the texture 8575bd8deadSopenharmony_ci coordinate set state used for queries of client state. 8585bd8deadSopenharmony_ci 8595bd8deadSopenharmony_ci (modify third paragraph, p. 25) The command 8605bd8deadSopenharmony_ci 8615bd8deadSopenharmony_ci void ArrayElement(int i); 8625bd8deadSopenharmony_ci 8635bd8deadSopenharmony_ci transfers the ith element of every enabled array to the GL. The effect 8645bd8deadSopenharmony_ci of ArrayElement(i) is the same as the effect of the command sequence 8655bd8deadSopenharmony_ci 8665bd8deadSopenharmony_ci if (normal array enabled) { 8675bd8deadSopenharmony_ci Normal3[type]v(normal array element i); 8685bd8deadSopenharmony_ci } 8695bd8deadSopenharmony_ci if (color array enabled) { 8705bd8deadSopenharmony_ci Color[size][type]v(color array element i); 8715bd8deadSopenharmony_ci } 8725bd8deadSopenharmony_ci if (secondary color array enabled) { 8735bd8deadSopenharmony_ci SecondaryColor3[type]v(secondary color array element i); 8745bd8deadSopenharmony_ci } 8755bd8deadSopenharmony_ci if (fog coordinate array enabled) { 8765bd8deadSopenharmony_ci FogCoord[type]v(fog coordinate array element i); 8775bd8deadSopenharmony_ci } 8785bd8deadSopenharmony_ci for (j = 0; j < textureUnits; j++) { 8795bd8deadSopenharmony_ci if (texture coordinate set j array enabled) { 8805bd8deadSopenharmony_ci MultiTexCoord[size][type]v(TEXTURE0 + j, 8815bd8deadSopenharmony_ci texture coordinate set j 8825bd8deadSopenharmony_ci array element i); 8835bd8deadSopenharmony_ci } 8845bd8deadSopenharmony_ci if (color index array enabled) { 8855bd8deadSopenharmony_ci Index[type]v(color index array element i); 8865bd8deadSopenharmony_ci } 8875bd8deadSopenharmony_ci if (edge flag array enabled) { 8885bd8deadSopenharmony_ci EdgeFlagv(edge flag array element i); 8895bd8deadSopenharmony_ci } 8905bd8deadSopenharmony_ci for (j = 1; j < genericAttributes; j++) { 8915bd8deadSopenharmony_ci if (generic vertex attribute j array enabled) { 8925bd8deadSopenharmony_ci if (generic vertex attribute j array normalization flag 8935bd8deadSopenharmony_ci is set, and type is not FLOAT or DOUBLE) { 8945bd8deadSopenharmony_ci VertexAttrib[size]N[type]vARB(j, generic vertex attribute j 8955bd8deadSopenharmony_ci array element i); 8965bd8deadSopenharmony_ci } else { 8975bd8deadSopenharmony_ci VertexAttrib[size][type]vARB(j, generic vertex attribute j 8985bd8deadSopenharmony_ci array element i); 8995bd8deadSopenharmony_ci } 9005bd8deadSopenharmony_ci } 9015bd8deadSopenharmony_ci } 9025bd8deadSopenharmony_ci if (generic attribute array 0 enabled) { 9035bd8deadSopenharmony_ci if (generic vertex attribute 0 array normalization flag 9045bd8deadSopenharmony_ci is set, and type is not FLOAT or DOUBLE) { 9055bd8deadSopenharmony_ci VertexAttrib[size]N[type]vARB(0, generic vertex attribute 0 9065bd8deadSopenharmony_ci array element i); 9075bd8deadSopenharmony_ci } else { 9085bd8deadSopenharmony_ci VertexAttrib[size][type]vARB(0, generic vertex attribute 0 9095bd8deadSopenharmony_ci array element i); 9105bd8deadSopenharmony_ci } 9115bd8deadSopenharmony_ci } else if (vertex array enabled) { 9125bd8deadSopenharmony_ci Vertex[size][type]vARB(vertex array element i); 9135bd8deadSopenharmony_ci } 9145bd8deadSopenharmony_ci 9155bd8deadSopenharmony_ci where <textureUnits> and <genericAttributes> give the number of texture 9165bd8deadSopenharmony_ci coordinate sets and generic vertex attributes supported by the 9175bd8deadSopenharmony_ci implementation, respectively. "[size]" and "[type]" correspond to the 9185bd8deadSopenharmony_ci size and type of the corresponding array. For generic vertex attributes, 9195bd8deadSopenharmony_ci it is assumed that a complete set of vertex attribute commands exists, 9205bd8deadSopenharmony_ci even though not all such functions are provided by the GL. 9215bd8deadSopenharmony_ci 9225bd8deadSopenharmony_ci (modify the first paragraph on p. 26) ...with one exception: The current 9235bd8deadSopenharmony_ci edge flag, texture coordinates, color, secondary color, color index, fog 9245bd8deadSopenharmony_ci coordinate, normal coordinates and generic attributes are each 9255bd8deadSopenharmony_ci indeterminate after execution of DrawArrays, if the corresponding array 9265bd8deadSopenharmony_ci is enabled. 9275bd8deadSopenharmony_ci 9285bd8deadSopenharmony_ci (modify the first paragraph on p. 27) ...with one exception: The current 9295bd8deadSopenharmony_ci edge flag, texture coordinates, color, secondary color, color index, fog 9305bd8deadSopenharmony_ci coordinate, normal coordinates and generic attributes are each 9315bd8deadSopenharmony_ci indeterminate after execution of DrawElements, if the corresponding 9325bd8deadSopenharmony_ci array is enabled. 9335bd8deadSopenharmony_ci 9345bd8deadSopenharmony_ci (modify last paragraph of section, p. 30) If the number of supported 9355bd8deadSopenharmony_ci texture coordinate sets (the value of MAX_TEXTURE_COORDS_ARB) is m and 9365bd8deadSopenharmony_ci the number of supported generic vertex attributes (the value of 9375bd8deadSopenharmony_ci MAX_VERTEX_ATTRIBS_ARB) is n, then the client state required to 9385bd8deadSopenharmony_ci implement vertex arrays consists of 7+m+n Boolean values, 7+m+n memory 9395bd8deadSopenharmony_ci pointers, 7+m+n integer stride values, 7+m+n symbolic constants 9405bd8deadSopenharmony_ci representing array types, 3+m+n integers representing values per element 9415bd8deadSopenharmony_ci and n boolean values indicating normalization. In the initial state, the 9425bd8deadSopenharmony_ci boolean values are each disabled, the memory pointers are each null, the 9435bd8deadSopenharmony_ci strides are each zero, the array types are each FLOAT, and the integers 9445bd8deadSopenharmony_ci representing values per element are each four. 9455bd8deadSopenharmony_ci 9465bd8deadSopenharmony_ci Modify Section 2.10, Coordinate Transformations (p. 31) 9475bd8deadSopenharmony_ci 9485bd8deadSopenharmony_ci (add at the beginning of the section) This section and the discussion 9495bd8deadSopenharmony_ci through section 2.13 describe the state values and operations necessary 9505bd8deadSopenharmony_ci for transforming vertex attributes according to a fixed-functionality 9515bd8deadSopenharmony_ci method. An alternate method for transforming vertex attributes is 9525bd8deadSopenharmony_ci described in section 2.15. 9535bd8deadSopenharmony_ci 9545bd8deadSopenharmony_ci Modify Section 2.10.2, Matrices (p. 33) 9555bd8deadSopenharmony_ci 9565bd8deadSopenharmony_ci (modify first paragraph, p. 37) For each texture coordinate set, a 4x4 9575bd8deadSopenharmony_ci matrix is applied to the corresponding texture coordinates. This matrix 9585bd8deadSopenharmony_ci is applied as... 9595bd8deadSopenharmony_ci 9605bd8deadSopenharmony_ci (modify third and fourth paragraphs, p. 37) The command 9615bd8deadSopenharmony_ci 9625bd8deadSopenharmony_ci void ActiveTexture(enum texture) 9635bd8deadSopenharmony_ci 9645bd8deadSopenharmony_ci specifies the active texture unit selector, ACTIVE_TEXTURE. Each texture 9655bd8deadSopenharmony_ci unit contains up to two distinct sub-units: a texture coordinate 9665bd8deadSopenharmony_ci processing unit (consisting of a texture matrix stack and texture 9675bd8deadSopenharmony_ci coordinate generation state) and a texture image unit (consisting of all 9685bd8deadSopenharmony_ci the texture state defined in Section 3.8). In implementations with a 9695bd8deadSopenharmony_ci different number of supported texture coordinate sets and texture image 9705bd8deadSopenharmony_ci units, some texture units may consist of only one of the two sub-units. 9715bd8deadSopenharmony_ci 9725bd8deadSopenharmony_ci The active texture unit selector specifies the texture coordinate set 9735bd8deadSopenharmony_ci accessed by commands involving texture coordinate processing. Such 9745bd8deadSopenharmony_ci commands include those accessing the current matrix stack (if 9755bd8deadSopenharmony_ci MATRIX_MODE is TEXTURE), TexGen (section 2.10.4), Enable/Disable (if any 9765bd8deadSopenharmony_ci texture coordinate generation enum is selected), as well as queries of 9775bd8deadSopenharmony_ci the current texture coordinates and current raster texture coordinates. 9785bd8deadSopenharmony_ci If the texture coordinate set number corresponding to the current value 9795bd8deadSopenharmony_ci of ACTIVE_TEXTURE is greater than or equal to the 9805bd8deadSopenharmony_ci implementation-dependent constant MAX_TEXTURE_COORDS_ARB, the error 9815bd8deadSopenharmony_ci INVALID_OPERATION is generated by any such command. The active texture 9825bd8deadSopenharmony_ci unit selector also selects the texture image unit accessed by commands 9835bd8deadSopenharmony_ci involving texture image processing (section 3.8). Such commands include 9845bd8deadSopenharmony_ci all variants of TexEnv, TexParameter, and TexImage commands, 9855bd8deadSopenharmony_ci BindTexture, Enable/Disable for any texture target (e.g., TEXTURE_2D), 9865bd8deadSopenharmony_ci and queries of all such state. If the texture image unit number 9875bd8deadSopenharmony_ci corresponding to the current value of ACTIVE_TEXTURE is greater than or 9885bd8deadSopenharmony_ci equal to the implementation-dependent constant 9895bd8deadSopenharmony_ci MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB, the error INVALID_OPERATION is 9905bd8deadSopenharmony_ci generated by any such command. 9915bd8deadSopenharmony_ci 9925bd8deadSopenharmony_ci ActiveTexture generates the error INVALID_ENUM if an invalid <texture> 9935bd8deadSopenharmony_ci is specified. <texture> is a symbolic constant of the form TEXTUREi, 9945bd8deadSopenharmony_ci indicating that texture unit i is to be modified. The constants obey 9955bd8deadSopenharmony_ci TEXTUREi = TEXTURE0 + i (i is in the range 0 to k-1, where k is the 9965bd8deadSopenharmony_ci larger of the MAX_TEXTURE_COORDS_ARB and 9975bd8deadSopenharmony_ci MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB). For compatibility with old OpenGL 9985bd8deadSopenharmony_ci specifications, the implementation-dependent constant MAX_TEXTURE_UNITS 9995bd8deadSopenharmony_ci specifies the number of conventional texture units supported by the 10005bd8deadSopenharmony_ci implementation. Its value must be no larger than the minimum of 10015bd8deadSopenharmony_ci MAX_TEXTURE_COORDS_ARB and MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB. 10025bd8deadSopenharmony_ci 10035bd8deadSopenharmony_ci (modify third paragraph, p. 38) The state required to implement 10045bd8deadSopenharmony_ci transformations consists of a 4-valued integer indicating the current 10055bd8deadSopenharmony_ci matrix mode, one stack of at least two 4x4 matrices for each of COLOR, 10065bd8deadSopenharmony_ci PROJECTION, each texture coordinate set, and TEXTURE and a stack of at 10075bd8deadSopenharmony_ci least 32 4x4 matrices for MODELVIEW. Each matrix stack has an associated 10085bd8deadSopenharmony_ci stack pointer. Initially, there is only one matrix on each stack, and 10095bd8deadSopenharmony_ci all matrices are set to the identity. The initial matrix mode is 10105bd8deadSopenharmony_ci MODELVIEW. The initial value of ACTIVE_TEXTURE is TEXTURE0. 10115bd8deadSopenharmony_ci 10125bd8deadSopenharmony_ci Modify Section 2.11, Clipping (p. 42) 10135bd8deadSopenharmony_ci 10145bd8deadSopenharmony_ci (Add a new paragraph between the first and second paragraph on page 43) 10155bd8deadSopenharmony_ci When a vertex shader is active, the vector (Xe Ye Ze We)T is no longer 10165bd8deadSopenharmony_ci computed by the GL. Instead, the OpenGL Shading Language provides a 10175bd8deadSopenharmony_ci gl_ClipVertex built-in variable, which is used in the dot product with 10185bd8deadSopenharmony_ci the client-defined clip planes. The user must ensure that the clip 10195bd8deadSopenharmony_ci vertex and client-defined clip planes are defined in the same coordinate 10205bd8deadSopenharmony_ci space. Note that the value in gl_ClipVertex is undefined if it is not 10215bd8deadSopenharmony_ci written by the vertex shader. 10225bd8deadSopenharmony_ci 10235bd8deadSopenharmony_ci Modify Section 2.12, Current Raster Position 10245bd8deadSopenharmony_ci 10255bd8deadSopenharmony_ci (modify fourth paragraph, p.44) The coordinates are treated as if they 10265bd8deadSopenharmony_ci were specified in a Vertex command. If a vertex shader is active, this 10275bd8deadSopenharmony_ci vertex shader is executed using the x, y, z, and w coordinates as the 10285bd8deadSopenharmony_ci object coordinates of the vertex. Otherwise, the x, y, z, and w 10295bd8deadSopenharmony_ci coordinates are transformed by the current model-view and projection 10305bd8deadSopenharmony_ci matrices. These coordinates, along with current values, are used to 10315bd8deadSopenharmony_ci generate primary and secondary colors and texture coordinates just as is 10325bd8deadSopenharmony_ci done for a vertex. The colors and texture coordinates produced using 10335bd8deadSopenharmony_ci either method replace the colors and texture coordinates stored in the 10345bd8deadSopenharmony_ci current raster position's associated data. If a vertex shader is active 10355bd8deadSopenharmony_ci then the current raster distance is set to the value of the shader built 10365bd8deadSopenharmony_ci in varying gl_FogFragCoord. Otherwise, if the value of the fog source 10375bd8deadSopenharmony_ci (see section 3.10) is FOG_COORDINATE_SOURCE, then the current raster 10385bd8deadSopenharmony_ci distance is set to the value of the current fog coordinate. Otherwise, 10395bd8deadSopenharmony_ci the current raster distance is set to the distance from the origin of 10405bd8deadSopenharmony_ci the eye coordinate system to the vertex as transformed by only the 10415bd8deadSopenharmony_ci current model-view matrix. This distance may be approximated as 10425bd8deadSopenharmony_ci discussed in section 3.10. 10435bd8deadSopenharmony_ci 10445bd8deadSopenharmony_ci Since vertex shaders may be executed when the raster position is set, 10455bd8deadSopenharmony_ci any attributes not written by the shader will result in undefined state 10465bd8deadSopenharmony_ci in the current raster position. Vertex shaders should output all varying 10475bd8deadSopenharmony_ci variables that would be used when rasterizing pixel primitives using the 10485bd8deadSopenharmony_ci current raster position. 10495bd8deadSopenharmony_ci 10505bd8deadSopenharmony_ci Modify section 2.13.1, Lighting 10515bd8deadSopenharmony_ci 10525bd8deadSopenharmony_ci (add just before the first paragraph on page 53) Additionally, vertex 10535bd8deadSopenharmony_ci shaders can operate in two-sided color mode. When a vertex shader is 10545bd8deadSopenharmony_ci active, front and back colors can be computed by the vertex shader and 10555bd8deadSopenharmony_ci written to the gl_FrontColor, gl_BackColor, gl_FrontSecondaryColor and 10565bd8deadSopenharmony_ci gl_BackSecondaryColor outputs. If VERTEX_PROGRAM_TWO_SIDE_ARB is 10575bd8deadSopenharmony_ci enabled, the GL chooses between front and back colors, as described 10585bd8deadSopenharmony_ci later. Otherwise, the front color output is always selected. Two-sided 10595bd8deadSopenharmony_ci color mode is enabled and disabled by calling Enable or Disable with the 10605bd8deadSopenharmony_ci symbolic value VERTEX_PROGRAM_TWO_SIDE_ARB. 10615bd8deadSopenharmony_ci 10625bd8deadSopenharmony_ci The selection between back color and front color depends ... 10635bd8deadSopenharmony_ci 10645bd8deadSopenharmony_ci Modify section 2.13.2, Lighting Parameter Specification (p. 53) 10655bd8deadSopenharmony_ci 10665bd8deadSopenharmony_ci (add a new paragraph between paragraph 2 and 3 on page 54) Material 10675bd8deadSopenharmony_ci properties can be changed inside a Begin/End pair by calling Material. 10685bd8deadSopenharmony_ci However, when a vertex shader is active such property changes are not 10695bd8deadSopenharmony_ci guaranteed to update material parameters, defined in Table 2.8, until 10705bd8deadSopenharmony_ci the following End command. 10715bd8deadSopenharmony_ci 10725bd8deadSopenharmony_ci Modify section 2.13.3, ColorMaterial 10735bd8deadSopenharmony_ci 10745bd8deadSopenharmony_ci (add a paragraph after the last paragraph, page 57) Material properties 10755bd8deadSopenharmony_ci can be changed inside a Begin/End pair indirectly by enabling 10765bd8deadSopenharmony_ci ColorMaterial mode and making Color calls. However, when a vertex shader 10775bd8deadSopenharmony_ci is active such property changes are not guaranteed to update material 10785bd8deadSopenharmony_ci parameters, defined in Table 2.8, until the following End command. 10795bd8deadSopenharmony_ci 10805bd8deadSopenharmony_ci Rename and Modify Section 2.13.8, Color and Texture Coordinate Clipping 10815bd8deadSopenharmony_ci (p.59) 10825bd8deadSopenharmony_ci 10835bd8deadSopenharmony_ci (modify second paragraph, p. 60) Texture coordinates, varying variables, 10845bd8deadSopenharmony_ci fog coordinates and point sizes computed on a per vertex basis must also 10855bd8deadSopenharmony_ci be clipped when a primitive is clipped. The method is exactly analogous 10865bd8deadSopenharmony_ci to that used for color clipping. 10875bd8deadSopenharmony_ci 10885bd8deadSopenharmony_ci Add Section 2.15 Vertex Shaders 10895bd8deadSopenharmony_ci 10905bd8deadSopenharmony_ci The sequence of operations described in Sections 2.10 through 2.13 is a 10915bd8deadSopenharmony_ci fixed- functionality method for processing vertex data. Applications can 10925bd8deadSopenharmony_ci more generally describe the operations that occur on vertex values and 10935bd8deadSopenharmony_ci their associated data by using a "vertex shader". 10945bd8deadSopenharmony_ci 10955bd8deadSopenharmony_ci A vertex shader is an array of strings containing source code for the 10965bd8deadSopenharmony_ci operations that are meant to occur on each vertex that is processed. The 10975bd8deadSopenharmony_ci language used for vertex shaders is described in the OpenGL Shading 10985bd8deadSopenharmony_ci Language Specification. 10995bd8deadSopenharmony_ci 11005bd8deadSopenharmony_ci Section 2.15.1 Creating and Using a Vertex Shader 11015bd8deadSopenharmony_ci 11025bd8deadSopenharmony_ci In order to create a vertex shader, use CreateShaderObjectARB with a 11035bd8deadSopenharmony_ci <shaderType> of VERTEX_SHADER_ARB. The source code for the vertex shader 11045bd8deadSopenharmony_ci can be specified in one call using the ShaderSourceARB command. A vertex 11055bd8deadSopenharmony_ci shader is compiled by issuing CompileShaderARB and attached to a program 11065bd8deadSopenharmony_ci object by calling AttachObjectARB. When LinkProgramARB is issued, all of 11075bd8deadSopenharmony_ci the attached shader objects of type VERTEX_SHADER_ARB are linked 11085bd8deadSopenharmony_ci together to create an executable program that can be used to process 11095bd8deadSopenharmony_ci vertex values and their associated data. This executable program will 11105bd8deadSopenharmony_ci become part of current state and used to process subsequent vertex data 11115bd8deadSopenharmony_ci when UseProgramObjectARB is called. 11125bd8deadSopenharmony_ci 11135bd8deadSopenharmony_ci CreateShaderObjectARB will set the object specific parameter 11145bd8deadSopenharmony_ci OBJECT_SUBTYPE_ARB to VERTEX_SHADER_ARB. 11155bd8deadSopenharmony_ci 11165bd8deadSopenharmony_ci Section 2.15.2 Vertex Attributes 11175bd8deadSopenharmony_ci 11185bd8deadSopenharmony_ci Conventional vertex attributes are communicated to the vertex shader via 11195bd8deadSopenharmony_ci the Vertex, Normal, Color, etc. API commands (or their vertex array 11205bd8deadSopenharmony_ci equivalents). Generic attributes are communicated via the 11215bd8deadSopenharmony_ci VertexAttrib*ARB and VertexAttribPointerARB commands. The binding of the 11225bd8deadSopenharmony_ci name of an attribute variable to a generic attribute index is assigned 11235bd8deadSopenharmony_ci by the GL and can be queried. This generic attribute index can be used 11245bd8deadSopenharmony_ci in the VertexAttrib*ARB and VertexAttribPointerARB commands. 11255bd8deadSopenharmony_ci Alternatively, this binding can be overridden and specified explicitly, 11265bd8deadSopenharmony_ci if so desired. These mechanisms make it possible for a vertex shader to 11275bd8deadSopenharmony_ci use descriptive names for attribute variables rather than having generic 11285bd8deadSopenharmony_ci variables numbered from 0 to MAX_VERTEX_ATTRIBS_ARB - 1. For example, an 11295bd8deadSopenharmony_ci application can specify that the attribute variable "tangentVec" in a 11305bd8deadSopenharmony_ci vertex shader will be mapped to generic vertex attribute number 6. 11315bd8deadSopenharmony_ci 11325bd8deadSopenharmony_ci When an attribute variable declared as a float, vec2, vec3 or vec4 is 11335bd8deadSopenharmony_ci bound to a generic attribute index <i>, its value(s) are stored in the 11345bd8deadSopenharmony_ci <x>, <x,y>, <x,y,z> or <x,y,z,w> components of the generic attribute at 11355bd8deadSopenharmony_ci slot <i>. Recall that the VertexAttrib*ARB commands will set unused 11365bd8deadSopenharmony_ci components to default values (either 0 or 1, see section 2.7). 11375bd8deadSopenharmony_ci 11385bd8deadSopenharmony_ci An attribute (either conventional or generic) is considered "active" if 11395bd8deadSopenharmony_ci it is determined by the compiler and linker that the attribute may be 11405bd8deadSopenharmony_ci accessed when the executable code is executed. The program object will 11415bd8deadSopenharmony_ci fail to link if the sum of the active generic and active conventional 11425bd8deadSopenharmony_ci attributes exceeds MAX_VERTEX_ATTRIBS_ARB. Attribute variables that are 11435bd8deadSopenharmony_ci declared in a vertex shader but never used will not count against the 11445bd8deadSopenharmony_ci limit. In cases where the compiler and linker cannot make a conclusive 11455bd8deadSopenharmony_ci determination, the attribute will be considered active. 11465bd8deadSopenharmony_ci 11475bd8deadSopenharmony_ci To determine which of the declared vertex attribute variables an 11485bd8deadSopenharmony_ci executable program uses and to determine their types, use the command: 11495bd8deadSopenharmony_ci 11505bd8deadSopenharmony_ci void GetActiveAttribARB(handleARB programObj, uint index, 11515bd8deadSopenharmony_ci sizei maxLength, sizei *length, int *size, 11525bd8deadSopenharmony_ci enum *type, charARB *name) 11535bd8deadSopenharmony_ci 11545bd8deadSopenharmony_ci This command provides information about the attribute selected by 11555bd8deadSopenharmony_ci <index>. The <index> of 0 selects the first active attribute, and 11565bd8deadSopenharmony_ci <index> of OBJECT_ACTIVE_ATTRIBUTES_ARB-1 selects the last active 11575bd8deadSopenharmony_ci attribute. The value of OBJECT_ACTIVE_ATTRIBUTES_ARB can be queried with 11585bd8deadSopenharmony_ci GetObjectParameter{if}vARB (see Section 6.1.12). If <index> is greater 11595bd8deadSopenharmony_ci than or equal to OBJECT_ACTIVE_ATTRIBUTES_ARB, the error INVALID_VALUE 11605bd8deadSopenharmony_ci is generated. 11615bd8deadSopenharmony_ci 11625bd8deadSopenharmony_ci The parameter <programObj> is a handle to a program object for which the 11635bd8deadSopenharmony_ci command LinkProgramARB has been issued in the past. It is not necessary 11645bd8deadSopenharmony_ci for <programObj> to have been linked successfully. The link could have 11655bd8deadSopenharmony_ci failed because the number of active attributes exceeded the limit. If 11665bd8deadSopenharmony_ci <programObj> is not of type PROGRAM_OBJECT_ARB, the error 11675bd8deadSopenharmony_ci INVALID_OPERATION is generated. 11685bd8deadSopenharmony_ci 11695bd8deadSopenharmony_ci For the selected attribute, the attribute name is returned into <name>. 11705bd8deadSopenharmony_ci The string <name> will be null terminated. The actual number of 11715bd8deadSopenharmony_ci characters written by the GL into <name> is returned in <length>. This 11725bd8deadSopenharmony_ci count excludes the null termination. If <length> is NULL then the GL 11735bd8deadSopenharmony_ci ignores this parameter. The maximum number of characters the GL is 11745bd8deadSopenharmony_ci allowed to write into <name> is passed in by <maxLength>. The returned 11755bd8deadSopenharmony_ci attribute name can be the name of a generic attribute or a conventional 11765bd8deadSopenharmony_ci attribute (which begin with the prefix "gl_", see the OpenGL Shading 11775bd8deadSopenharmony_ci Language specification for a complete list). The length of the longest 11785bd8deadSopenharmony_ci attribute name in <programObj> is given by 11795bd8deadSopenharmony_ci OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB, which can be queried with 11805bd8deadSopenharmony_ci GetObjectParameter{if}vARB (see Section 6.1.12). 11815bd8deadSopenharmony_ci 11825bd8deadSopenharmony_ci For the selected attribute, the type of the attribute is returned into 11835bd8deadSopenharmony_ci <type>. The size of the attribute is returned into <size>. The value in 11845bd8deadSopenharmony_ci <size> is in units of the type returned in <type>. The type returned can 11855bd8deadSopenharmony_ci be any of FLOAT, FLOAT_VEC2_ARB, FLOAT_VEC3_ARB, FLOAT_VEC4_ARB, 11865bd8deadSopenharmony_ci FLOAT_MAT2_ARB, FLOAT_MAT3_ARB, or FLOAT_MAT4_ARB. 11875bd8deadSopenharmony_ci 11885bd8deadSopenharmony_ci If an error occurred, the return parameters <length>, <size>, <type> and 11895bd8deadSopenharmony_ci <name> will be unmodified. 11905bd8deadSopenharmony_ci 11915bd8deadSopenharmony_ci This command will return as much information about active attributes as 11925bd8deadSopenharmony_ci possible. If no information is available, <length> will be set to zero 11935bd8deadSopenharmony_ci and <name> will be an empty string. This situation could arise if 11945bd8deadSopenharmony_ci GetActiveAttribARB is issued after a failed link. 11955bd8deadSopenharmony_ci 11965bd8deadSopenharmony_ci After a program object has been linked successfully, the bindings of 11975bd8deadSopenharmony_ci attribute variable names to indices can be queried. 11985bd8deadSopenharmony_ci 11995bd8deadSopenharmony_ci The command 12005bd8deadSopenharmony_ci 12015bd8deadSopenharmony_ci GLint GetAttribLocationARB(handle programObj, const charARB *name) 12025bd8deadSopenharmony_ci 12035bd8deadSopenharmony_ci will return the generic attribute index that the attribute variable 12045bd8deadSopenharmony_ci named <name> is bound to. <name> has to be a null terminated string. 12055bd8deadSopenharmony_ci <programObj> is a handle to a program object that has been successfully 12065bd8deadSopenharmony_ci linked. If <name> is not an active attribute, or if <name> is a 12075bd8deadSopenharmony_ci conventional attribute, -1 will be returned. If <name> is an attribute 12085bd8deadSopenharmony_ci matrix, and it is active, then GetAttribLocationARB returns the index of 12095bd8deadSopenharmony_ci the first column of that matrix. If <programObj> has not been 12105bd8deadSopenharmony_ci successfully linked, or if <programObj> is not of type 12115bd8deadSopenharmony_ci PROGRAM_OBJECT_ARB, the error INVALID_OPERATION is generated. 12125bd8deadSopenharmony_ci 12135bd8deadSopenharmony_ci The binding of an attribute variable to a generic attribute index can 12145bd8deadSopenharmony_ci also be specified explicitly. 12155bd8deadSopenharmony_ci 12165bd8deadSopenharmony_ci The command 12175bd8deadSopenharmony_ci 12185bd8deadSopenharmony_ci void BindAttribLocationARB(handleARB programObj, uint index, 12195bd8deadSopenharmony_ci const charARB *name) 12205bd8deadSopenharmony_ci 12215bd8deadSopenharmony_ci binds the attribute variable named <name> to generic vertex attribute 12225bd8deadSopenharmony_ci <index> for the program object <programObj>. If <name> was bound 12235bd8deadSopenharmony_ci previously, that binding information is lost. <name> has to be a null 12245bd8deadSopenharmony_ci terminated string. If <name> is declared as an attribute matrix, <index> 12255bd8deadSopenharmony_ci indicates the first column of that matrix. The other matrix columns are 12265bd8deadSopenharmony_ci then automatically bound to locations <index> + 1 for a mat2, <index> + 12275bd8deadSopenharmony_ci 1 and <index> + 2 for a mat3 and <index> + 1, <index> + 2 and <index> + 12285bd8deadSopenharmony_ci 3 for a mat4. The error INVALID_VALUE is generated if <index> is equal 12295bd8deadSopenharmony_ci or greater than MAX_VERTEX_ATTRIBS_ARB. The error INVALID_OPERATION is 12305bd8deadSopenharmony_ci generated if <name> starts with the reserved "gl_" prefix. If 12315bd8deadSopenharmony_ci <programObj> is not of type PROGRAM_OBJECT_ARB, the error 12325bd8deadSopenharmony_ci INVALID_OPERATION is generated. 12335bd8deadSopenharmony_ci 12345bd8deadSopenharmony_ci Applications cannot bind any conventional attributes (the attributes 12355bd8deadSopenharmony_ci starting with "gl_" defined in the OpenGL Shading Language 12365bd8deadSopenharmony_ci specification). Conventional attributes used in a vertex shader will be 12375bd8deadSopenharmony_ci bound automatically. 12385bd8deadSopenharmony_ci 12395bd8deadSopenharmony_ci In order to have attribute bindings take effect the program object needs 12405bd8deadSopenharmony_ci to be linked after issuing the BindAttribLocationARB command. The linker 12415bd8deadSopenharmony_ci will bind any active attributes not already explicitly specified through 12425bd8deadSopenharmony_ci BindAttribLocationARB. After a successful link the complete list of 12435bd8deadSopenharmony_ci bindings can be queried using the command GetAttribLocationARB. 12445bd8deadSopenharmony_ci 12455bd8deadSopenharmony_ci It is generally not known to the GL until link time if <name> is 12465bd8deadSopenharmony_ci declared as an attribute matrix. Therefore LinkProgramARB can fail 12475bd8deadSopenharmony_ci because binding of a matrix to a generic attribute index caused one or 12485bd8deadSopenharmony_ci more columns of the matrix to be bound to indices outside the 12495bd8deadSopenharmony_ci MAX_VERTEX_ATTRIBS_ARB range. LinkProgramARB can also fail because 12505bd8deadSopenharmony_ci BindAttribLocationsARB commands have been issued leaving not enough 12515bd8deadSopenharmony_ci contiguous indices for a matrix to be fitted in by the linker. 12525bd8deadSopenharmony_ci 12535bd8deadSopenharmony_ci It is allowed to issue BindAttribLocationARB before any vertex shader 12545bd8deadSopenharmony_ci objects are attached to a program object. Hence it is allowed to bind 12555bd8deadSopenharmony_ci any name (except a name starting with "gl_") to an index, including a 12565bd8deadSopenharmony_ci name that is never used as an attribute in any vertex shader object. 12575bd8deadSopenharmony_ci 12585bd8deadSopenharmony_ci The values of generic attributes sent to generic attribute index <i> are 12595bd8deadSopenharmony_ci part of current GL state, just like the conventional attributes. If a 12605bd8deadSopenharmony_ci new program object has been made active, then these values will be 12615bd8deadSopenharmony_ci tracked by the GL in such a way that the same values will be observed by 12625bd8deadSopenharmony_ci attributes in the new program object that are also bound to index <i>. 12635bd8deadSopenharmony_ci 12645bd8deadSopenharmony_ci It is a link error to have a vertex shader statically consume the 12655bd8deadSopenharmony_ci conventional attribute gl_Vertex and have the same vertex shader 12665bd8deadSopenharmony_ci statically consume a generic vertex attribute that is bound to index 12675bd8deadSopenharmony_ci zero. This would result in aliasing between a generic vertex attribute 12685bd8deadSopenharmony_ci and the conventional attribute gl_Vertex, which is disallowed (see the 12695bd8deadSopenharmony_ci description of VertexAttrib*ARB in Section 2.7). 12705bd8deadSopenharmony_ci 12715bd8deadSopenharmony_ci It is possible for an application to bind more than one attribute name 12725bd8deadSopenharmony_ci to the same location. This is referred to as "aliasing". This will only 12735bd8deadSopenharmony_ci work if only one of the aliased attributes is active in the executable 12745bd8deadSopenharmony_ci program, or if no path through the shader consumes more than one 12755bd8deadSopenharmony_ci attribute of a set of attributes aliased to the same location. OpenGL 12765bd8deadSopenharmony_ci implementations are not required to detect violations of this rule. The 12775bd8deadSopenharmony_ci compiler and linker are allowed to assume that no aliasing is done, and 12785bd8deadSopenharmony_ci are free to employ optimizations that work only in the absence of 12795bd8deadSopenharmony_ci aliasing. It is not possible to alias generic attributes with 12805bd8deadSopenharmony_ci conventional ones. 12815bd8deadSopenharmony_ci 12825bd8deadSopenharmony_ci When a vertex shader is active, more (or less) vertex attributes might 12835bd8deadSopenharmony_ci be sent to OpenGL than the vertex shader uses. When fewer attributes 12845bd8deadSopenharmony_ci than the current vertex shader uses are sent, the vertex shader uses the 12855bd8deadSopenharmony_ci values in the current state for the attributes not provided. In the case 12865bd8deadSopenharmony_ci of a generic vertex attribute that current value comes from the slot 12875bd8deadSopenharmony_ci index number the generic attribute is bound to. When more attributes are 12885bd8deadSopenharmony_ci provided than the vertex shader uses the vertex shader ignores the extra 12895bd8deadSopenharmony_ci attributes but these extra attributes continue to modify the current 12905bd8deadSopenharmony_ci vertex attribute state. 12915bd8deadSopenharmony_ci 12925bd8deadSopenharmony_ci Section 2.15.3 Uniform Variables 12935bd8deadSopenharmony_ci 12945bd8deadSopenharmony_ci A vertex shader may define one or more "uniform" variables. These values 12955bd8deadSopenharmony_ci are to remain constant over a primitive or a sequence of primitives. The 12965bd8deadSopenharmony_ci OpenGL Shading Language specification defines a set of built-in uniform 12975bd8deadSopenharmony_ci variables for vertex shaders that correspond to the state that GL 12985bd8deadSopenharmony_ci manages for the purpose of processing vertices. The amount of storage 12995bd8deadSopenharmony_ci that is available for vertex shader uniform variables is specified by 13005bd8deadSopenharmony_ci the implementation dependent constant MAX_VERTEX_UNIFORM_COMPONENTS_ARB. 13015bd8deadSopenharmony_ci This value represents the number of individual floating point values, or 13025bd8deadSopenharmony_ci individual integer values or individual Boolean values that can be held 13035bd8deadSopenharmony_ci in uniform variable storage for a vertex shader. A link error will be 13045bd8deadSopenharmony_ci generated if an attempt is made to utilize more than the space available 13055bd8deadSopenharmony_ci for vertex shader uniform variables. 13065bd8deadSopenharmony_ci 13075bd8deadSopenharmony_ci Section 2.15.4 Varying Variables 13085bd8deadSopenharmony_ci 13095bd8deadSopenharmony_ci A vertex shader may define one or more "varying" variables (see the 13105bd8deadSopenharmony_ci OpenGL Shading Language specification). These values are expected to be 13115bd8deadSopenharmony_ci interpolated across the primitive being rendered. The OpenGL Shading 13125bd8deadSopenharmony_ci Language specification defines a set of built-in varying variables for 13135bd8deadSopenharmony_ci vertex shaders that correspond to the values required for the fixed 13145bd8deadSopenharmony_ci functionality processing that occurs after vertex processing. The number 13155bd8deadSopenharmony_ci of interpolators that is available for processing varying variables is 13165bd8deadSopenharmony_ci specified by the implementation dependent constant 13175bd8deadSopenharmony_ci MAX_VARYING_FLOATS_ARB. This value represents the number of individual 13185bd8deadSopenharmony_ci floating point values that can be interpolated, therefore interpolating 13195bd8deadSopenharmony_ci a vertex will consume 4 (x, y, z, w) and interpolating a color will also 13205bd8deadSopenharmony_ci consume 4 (R, G, B, A). A link error will be generated if an attempt is 13215bd8deadSopenharmony_ci made to utilize more than MAX_VARYING_FLOATS_ARB interpolators. 13225bd8deadSopenharmony_ci 13235bd8deadSopenharmony_ci Section 2.15.5 Texture access 13245bd8deadSopenharmony_ci 13255bd8deadSopenharmony_ci Vertex shaders have the ability to do a lookup into a texture map. Zero 13265bd8deadSopenharmony_ci or more texture image units are available to a vertex shader to access 13275bd8deadSopenharmony_ci textures. The maximum number of texture image units available to a 13285bd8deadSopenharmony_ci vertex shader is MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB. The maximum number 13295bd8deadSopenharmony_ci of texture image units available to the fragment stage of OpenGL is 13305bd8deadSopenharmony_ci MAX_TEXTURE_IMAGE_UNITS_ARB. Both the vertex shader and fragment 13315bd8deadSopenharmony_ci processing combined cannot use more than 13325bd8deadSopenharmony_ci MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB texture image units. If both the 13335bd8deadSopenharmony_ci vertex shader and the fragment processing stage access the same texture 13345bd8deadSopenharmony_ci image unit, then that counts as using two texture image units against 13355bd8deadSopenharmony_ci the MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB limit. 13365bd8deadSopenharmony_ci 13375bd8deadSopenharmony_ci When a texture lookup is performed in a vertex shader, the GL computes 13385bd8deadSopenharmony_ci the filtered texture value tau in the manner described in sections 3.8.8 13395bd8deadSopenharmony_ci and 3.8.9, and converts it to a texture source color C_s according to 13405bd8deadSopenharmony_ci table 3.21 (section 3.8.13). The GL returns a four-component vector 13415bd8deadSopenharmony_ci (R_s, G_s, B_s, A_s) to the vertex shader. 13425bd8deadSopenharmony_ci 13435bd8deadSopenharmony_ci In a vertex shader, it is not possible to perform automatic LOD 13445bd8deadSopenharmony_ci calculations using partial derivatives of the texture coordinates with 13455bd8deadSopenharmony_ci respect to window coordinates as described in section 3.8.8. Hence, 13465bd8deadSopenharmony_ci there is no automatic selection of an image array level. Minification or 13475bd8deadSopenharmony_ci magnification of a texture map is controlled by a LOD value optionally 13485bd8deadSopenharmony_ci passed as an argument in the texture lookup functions. If the texture 13495bd8deadSopenharmony_ci lookup function supplies an explicit LOD value <l>, then the pre-bias 13505bd8deadSopenharmony_ci LOD value lambda_base(x,y) = l (equation 3.16a). If the texture lookup 13515bd8deadSopenharmony_ci function does not supply an explicit LOD value, then lambda_base(x,y) = 13525bd8deadSopenharmony_ci 0. The scale factor rho(x,y) and its approximation function f(x,y), 13535bd8deadSopenharmony_ci pages 141-142, are ignored. 13545bd8deadSopenharmony_ci 13555bd8deadSopenharmony_ci Texture comparison requires the vertex shader to use the shadow versions 13565bd8deadSopenharmony_ci of the texture lookup functions. This in turn means that samplers of 13575bd8deadSopenharmony_ci type sampler1DShadow or sampler2DShadow or sampler2DRectShadow need to 13585bd8deadSopenharmony_ci be used to indicate the texture image unit that has a depth texture 13595bd8deadSopenharmony_ci bound to it. 13605bd8deadSopenharmony_ci 13615bd8deadSopenharmony_ci The results of a texture lookup function are undefined if: 13625bd8deadSopenharmony_ci 13635bd8deadSopenharmony_ci * The sampler used in a texture lookup function is of type sampler1D 13645bd8deadSopenharmony_ci or sampler2D or sampler2DRect, and the texture object's internal 13655bd8deadSopenharmony_ci format is DEPTH_COMPONENT, and the TEXTURE_COMPARE_MODE is not NONE. 13665bd8deadSopenharmony_ci * The sampler used in a texture lookup function is of type 13675bd8deadSopenharmony_ci sampler1DShadow or sampler2DShadow or sampler2DRectShadow, and the 13685bd8deadSopenharmony_ci texture object's internal format is DEPTH_COMPONENT, and the 13695bd8deadSopenharmony_ci TEXTURE_COMPARE_MODE is NONE. 13705bd8deadSopenharmony_ci * The sampler used in a texture lookup function is of type 13715bd8deadSopenharmony_ci sampler1DShadow or sampler2DShadow or sampler2DRectShadow, and the 13725bd8deadSopenharmony_ci texture object's internal format is not DEPTH_COMPONENT. 13735bd8deadSopenharmony_ci 13745bd8deadSopenharmony_ci If a vertex shader uses a sampler which associated texture object is not 13755bd8deadSopenharmony_ci complete, as defined in section 3.8.10, the texture image unit will 13765bd8deadSopenharmony_ci return (R, G, B, A) = (0, 0, 0, 1). 13775bd8deadSopenharmony_ci 13785bd8deadSopenharmony_ci Section 2.15.6 Position Invariance 13795bd8deadSopenharmony_ci 13805bd8deadSopenharmony_ci If a vertex shader uses the built-in function ftransform() to generate a 13815bd8deadSopenharmony_ci vertex position, then this generally guarantees that the transformed 13825bd8deadSopenharmony_ci position will be the same whether using this vertex shader or the fixed 13835bd8deadSopenharmony_ci functionality OpenGL pipeline. This allows for correct mixed multi-pass 13845bd8deadSopenharmony_ci rendering algorithms. 13855bd8deadSopenharmony_ci 13865bd8deadSopenharmony_ci Section 2.15.7 Vertex Shader Execution 13875bd8deadSopenharmony_ci 13885bd8deadSopenharmony_ci If a successfully linked program object that contains a vertex shader is 13895bd8deadSopenharmony_ci made current by calling UseProgramObjectARB, the executable version of 13905bd8deadSopenharmony_ci the vertex shader is used to process incoming vertex values rather than 13915bd8deadSopenharmony_ci the fixed functionality vertex processing described in Sections 13925bd8deadSopenharmony_ci 2.10-2.13. In particular, 13935bd8deadSopenharmony_ci 13945bd8deadSopenharmony_ci * The model-view matrix is not applied to vertex coordinates (pp. 13955bd8deadSopenharmony_ci 31-32) 13965bd8deadSopenharmony_ci * The projection matrix is not applied to vertex coordinates (pp. 13975bd8deadSopenharmony_ci 31-32) 13985bd8deadSopenharmony_ci * The texture matrices are not applied to texture coordinates (p. 37) 13995bd8deadSopenharmony_ci * Normals are not transformed to eye coordinates (pp. 38-39) 14005bd8deadSopenharmony_ci * Normals are not rescaled or normalized (pp. 39-40) 14015bd8deadSopenharmony_ci * Normalization of AUTO_NORMAL evaluated normals is not performed. (p. 14025bd8deadSopenharmony_ci 191) 14035bd8deadSopenharmony_ci * Texture coordinates are not generated automatically (pp. 40-42) 14045bd8deadSopenharmony_ci * Per vertex lighting is not performed (pp. 48-53) 14055bd8deadSopenharmony_ci * Color material computations are not performed (pp. 54-57) 14065bd8deadSopenharmony_ci * Color index lighting is not performed (pp. 57-58) 14075bd8deadSopenharmony_ci * All of the above applies when setting the current raster position 14085bd8deadSopenharmony_ci (pp. 44-45) 14095bd8deadSopenharmony_ci 14105bd8deadSopenharmony_ci The following operations are applied to vertex values that are the 14115bd8deadSopenharmony_ci result of executing the vertex shader: 14125bd8deadSopenharmony_ci 14135bd8deadSopenharmony_ci * Color clamping or masking (p. 56) 14145bd8deadSopenharmony_ci * Perspective division on clip coordinates (pp. 31-32) 14155bd8deadSopenharmony_ci * Viewport mapping (pp. 32-33) 14165bd8deadSopenharmony_ci * Depth range (p. 33) 14175bd8deadSopenharmony_ci * Clipping, including user clipping (pp. 42-44) 14185bd8deadSopenharmony_ci * Front face determination (p. 53) 14195bd8deadSopenharmony_ci * Flat-shading (pp. 58-59) 14205bd8deadSopenharmony_ci * Color, texture coordinate, fog, point-size and generic attribute 14215bd8deadSopenharmony_ci clipping (pp. 59-60) 14225bd8deadSopenharmony_ci * Final color processing (p. 60) 14235bd8deadSopenharmony_ci 14245bd8deadSopenharmony_ci Section 2.15.8 Required State 14255bd8deadSopenharmony_ci 14265bd8deadSopenharmony_ci Besides the required state outlined in the ARB_shader_objects extension 14275bd8deadSopenharmony_ci document, the following state is also required: 14285bd8deadSopenharmony_ci 14295bd8deadSopenharmony_ci The state required to support vertex shaders consists of: 14305bd8deadSopenharmony_ci 14315bd8deadSopenharmony_ci * A bit indicating whether or not vertex program two-sided color mode 14325bd8deadSopenharmony_ci is enabled, initially disabled. 14335bd8deadSopenharmony_ci * A bit indicating whether or not vertex program point size mode is 14345bd8deadSopenharmony_ci enabled, initially disabled. 14355bd8deadSopenharmony_ci 14365bd8deadSopenharmony_ci The state required per program object consists of: 14375bd8deadSopenharmony_ci 14385bd8deadSopenharmony_ci * An array of strings holding the names of active attributes. 14395bd8deadSopenharmony_ci * An array of integers holding the sizes of active attributes. 14405bd8deadSopenharmony_ci * An array of integers holding the types of active attributes. 14415bd8deadSopenharmony_ci * An integer holding the number of active attributes 14425bd8deadSopenharmony_ci * An integer holding the length of the longest attribute name. 14435bd8deadSopenharmony_ci * An array of integers holding the locations of active generic 14445bd8deadSopenharmony_ci attributes. 14455bd8deadSopenharmony_ci * An array of MAX_VERTEX_UNIFORM_COMPONENTS_ARB words that holds 14465bd8deadSopenharmony_ci uniform values. 14475bd8deadSopenharmony_ci 14485bd8deadSopenharmony_ciAdditions to Chapter 3 of the OpenGL 1.4 Specification (Rasterization) 14495bd8deadSopenharmony_ci 14505bd8deadSopenharmony_ci Modify Section 3.3, Points (p. 66) 14515bd8deadSopenharmony_ci 14525bd8deadSopenharmony_ci (replace the first and second paragraph) If a vertex shader is not 14535bd8deadSopenharmony_ci active, then the rasterization of points is controlled with 14545bd8deadSopenharmony_ci 14555bd8deadSopenharmony_ci void PointSize(float size) 14565bd8deadSopenharmony_ci 14575bd8deadSopenharmony_ci <size> specifies the requested size of a point. The default value is 14585bd8deadSopenharmony_ci 1.0. A value less than or equal to zero results in the error 14595bd8deadSopenharmony_ci INVALID_VALUE. The requested point size is multiplied with a distance 14605bd8deadSopenharmony_ci attenuation factor, clamped to a specified point size range, and further 14615bd8deadSopenharmony_ci clamped to the implementation-dependent point size range to produce the 14625bd8deadSopenharmony_ci derived point size: 14635bd8deadSopenharmony_ci 14645bd8deadSopenharmony_ci derived_size = ... 14655bd8deadSopenharmony_ci 14665bd8deadSopenharmony_ci (add a paragraph between the third and fourth paragraph) 14675bd8deadSopenharmony_ci 14685bd8deadSopenharmony_ci If a vertex shader is active and vertex program point size mode is 14695bd8deadSopenharmony_ci enabled, then the derived point size is taken from the, potentially 14705bd8deadSopenharmony_ci clipped, shader built in gl_PointSize and clamped to the 14715bd8deadSopenharmony_ci implementation-dependent point size range. If the value written to 14725bd8deadSopenharmony_ci gl_PointSize is less than or equal to zero, results are undefined. If a 14735bd8deadSopenharmony_ci vertex shader is active and vertex program point size mode is disabled, 14745bd8deadSopenharmony_ci then the derived point size is taken from the point size state as 14755bd8deadSopenharmony_ci specified by the PointSize command. In this case no distance attenuation 14765bd8deadSopenharmony_ci is performed. Vertex program point size mode is enabled and disabled by 14775bd8deadSopenharmony_ci calling Enable or Disable with the symbolic value 14785bd8deadSopenharmony_ci VERTEX_PROGRAM_POINT_SIZE_ARB. 14795bd8deadSopenharmony_ci 14805bd8deadSopenharmony_ci If multisampling is enabled, an implementation ... 14815bd8deadSopenharmony_ci 14825bd8deadSopenharmony_ci Modify Section 3.8.8 Texture Minification (p. 140) 14835bd8deadSopenharmony_ci 14845bd8deadSopenharmony_ci (modify subsection Scale Factor and Level of Detail. Replace its first 14855bd8deadSopenharmony_ci paragraph) 14865bd8deadSopenharmony_ci 14875bd8deadSopenharmony_ci The choice is governed by a scale factor rho(x,y) and the level of 14885bd8deadSopenharmony_ci detail parameter lambda(x,y), defined as 14895bd8deadSopenharmony_ci 14905bd8deadSopenharmony_ci lambda_base(x,y) = log2[rho(x,y)] 3.16a 14915bd8deadSopenharmony_ci 14925bd8deadSopenharmony_ci lambda'(x,y) = lambda_base(x,y) + 3.16b 14935bd8deadSopenharmony_ci clamp(texobj_bias + texunit_bias) 14945bd8deadSopenharmony_ci 14955bd8deadSopenharmony_ci |------- LODmax lambda' > LODmax 14965bd8deadSopenharmony_ci lambda(x,y) = | lambda' LODmin <= lambda' <= LODmax 3.16c 14975bd8deadSopenharmony_ci | LODmin lambda' < LODmin 14985bd8deadSopenharmony_ci |------- undefined LODmin > LODmax 14995bd8deadSopenharmony_ci 15005bd8deadSopenharmony_ci texobj_bias is the value of TEXTURE_LOD_BIAS for the bound texture 15015bd8deadSopenharmony_ci object (as described in section 3.8.4), and texunit_bias is the value of 15025bd8deadSopenharmony_ci TEXTURE_LOD_BIAS for the current texture unit (as described in section 15035bd8deadSopenharmony_ci 3.8.13). The sum of these values is clamped to the range [-max_bias, 15045bd8deadSopenharmony_ci max_bias] where max_bias is the value of the implementation defined 15055bd8deadSopenharmony_ci constant MAX_TEXTURE_LOD_BIAS. 15065bd8deadSopenharmony_ci 15075bd8deadSopenharmony_ci Modify Section 3.9 Color Sum (p. 160) 15085bd8deadSopenharmony_ci 15095bd8deadSopenharmony_ci (modify third paragraph) Color sum is enabled or disabled using the 15105bd8deadSopenharmony_ci generic Enable and Disable commands, respectively, with the symbolic 15115bd8deadSopenharmony_ci constant COLOR_SUM. If lighting is enabled and if a vertex shader is not 15125bd8deadSopenharmony_ci active, the color sum stage is always applied, ignoring the value of 15135bd8deadSopenharmony_ci COLOR_SUM. 15145bd8deadSopenharmony_ci 15155bd8deadSopenharmony_ci Modify Section 3.10, Fog (p. 160) 15165bd8deadSopenharmony_ci 15175bd8deadSopenharmony_ci (modify second paragraph) If a vertex shader is active, or if the fog 15185bd8deadSopenharmony_ci source, as defined below, is FOG_COORDINATE, then c is the interpolated 15195bd8deadSopenharmony_ci value of the fog coordinate for this fragment. Otherwise, if the fog 15205bd8deadSopenharmony_ci source is FRAGMENT_DEPTH, then c is the eye-coordinate distance from the 15215bd8deadSopenharmony_ci eye, (0, 0, 0, 1) in eye coordinates, to the fragment center. The 15225bd8deadSopenharmony_ci equation and the fog source, along with either d or e and s, is 15235bd8deadSopenharmony_ci specified with 15245bd8deadSopenharmony_ci 15255bd8deadSopenharmony_ciAdditions to Chapter 4 of the OpenGL 1.4 Specification (Per-Fragment 15265bd8deadSopenharmony_ciOperations and the Frame Buffer) 15275bd8deadSopenharmony_ci 15285bd8deadSopenharmony_ci None 15295bd8deadSopenharmony_ci 15305bd8deadSopenharmony_ciAdditions to Chapter 5 of the OpenGL 1.4 Specification (Special Functions) 15315bd8deadSopenharmony_ci 15325bd8deadSopenharmony_ci Modify Section 5.1, Evaluators (p. 188) 15335bd8deadSopenharmony_ci 15345bd8deadSopenharmony_ci (modify next-to-last paragraph, p. 191) For MAP_VERTEX_3, let q = p. For 15355bd8deadSopenharmony_ci MAP_VERTEX_4, let q=(x/w,y/w,z/w), where (x,y,z,w) = p. Then let 15365bd8deadSopenharmony_ci 15375bd8deadSopenharmony_ci dq dq 15385bd8deadSopenharmony_ci m = -- x --. 15395bd8deadSopenharmony_ci du dv 15405bd8deadSopenharmony_ci 15415bd8deadSopenharmony_ci Then the generated analytic normal, n, is given by n=m if a vertex 15425bd8deadSopenharmony_ci shader is active, or else by n=m/|m|. 15435bd8deadSopenharmony_ci 15445bd8deadSopenharmony_ci Modify Section 5.4, Display Lists (p. 198) 15455bd8deadSopenharmony_ci 15465bd8deadSopenharmony_ci (change second paragraph, p. 202) 15475bd8deadSopenharmony_ci 15485bd8deadSopenharmony_ci Certain commands, when called when compiling a display list, are not 15495bd8deadSopenharmony_ci compiled into the display list but are executed immediately. These are: 15505bd8deadSopenharmony_ci IsList,...Flush, Finish, GetAttribLocationARB, GetActiveAttribARB, 15515bd8deadSopenharmony_ci BindAttribLocationARB, VertexAttribPointerARB, 15525bd8deadSopenharmony_ci EnableVertexAttribArrayARB, DisableVertexAttribArrayARB as well as 15535bd8deadSopenharmony_ci IsEnabled and all of the Get commands defined in Section 6.1.12. 15545bd8deadSopenharmony_ci 15555bd8deadSopenharmony_ci (add just before the final paragraph of the section on p. 202) 15565bd8deadSopenharmony_ci 15575bd8deadSopenharmony_ci When a program object is in use, a display list may be executed whose 15585bd8deadSopenharmony_ci vertex attribute calls do not match up exactly with what is expected by 15595bd8deadSopenharmony_ci the vertex shader contained in that program object. How this mismatch is 15605bd8deadSopenharmony_ci handled is described in section 2.15.2. 15615bd8deadSopenharmony_ci 15625bd8deadSopenharmony_ciAdditions to Chapter 6 of the OpenGL 1.4 Specification (State and State 15635bd8deadSopenharmony_ciRequests) 15645bd8deadSopenharmony_ci 15655bd8deadSopenharmony_ci Modify Section 6.1.2, Data Conversions (p. 205) 15665bd8deadSopenharmony_ci 15675bd8deadSopenharmony_ci (add to end of last paragraph, p. 206) Queries of texture state 15685bd8deadSopenharmony_ci variables corresponding to texture coordinate processing unit (namely, 15695bd8deadSopenharmony_ci TexGen state and enables, and matrices) will produce an 15705bd8deadSopenharmony_ci INVALID_OPERATION error if the value of ACTIVE_TEXTURE is greater than 15715bd8deadSopenharmony_ci or equal to MAX_TEXTURE_COORDS_ARB. All other texture state queries will 15725bd8deadSopenharmony_ci result in an INVALID_OPERATION error if the value of ACTIVE_TEXTURE is 15735bd8deadSopenharmony_ci greater than or equal to MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB. 15745bd8deadSopenharmony_ci 15755bd8deadSopenharmony_ci Modify section 6.1.12 Generic Object Queries. 15765bd8deadSopenharmony_ci 15775bd8deadSopenharmony_ci The commands 15785bd8deadSopenharmony_ci 15795bd8deadSopenharmony_ci void GetObjectParameterfvARB(handleARB obj, enum pname, 15805bd8deadSopenharmony_ci float *params) 15815bd8deadSopenharmony_ci void GetObjectParameterivARB(handleARB obj, enum pname, int *params) 15825bd8deadSopenharmony_ci 15835bd8deadSopenharmony_ci return object specific parameter values for object <obj> in <params>. 15845bd8deadSopenharmony_ci The parameter value to return is specified by <pname>. 15855bd8deadSopenharmony_ci 15865bd8deadSopenharmony_ci If <pname> is OBJECT_SUBTYPE_ARB, GetObjectParameter{if}vARB returns 15875bd8deadSopenharmony_ci VERTEX_SHADER_ARB if <obj> references a shader object. If <obj> is not 15885bd8deadSopenharmony_ci of type SHADER_OBJECT_ARB, the error INVALID_OPERATION is generated. 15895bd8deadSopenharmony_ci 15905bd8deadSopenharmony_ci If <pname> is OBJECT_ACTIVE_ATTRIBUTES_ARB, GetObjectParameter{if}vARB 15915bd8deadSopenharmony_ci returns the number of active attributes. If no active attributes exist, 15925bd8deadSopenharmony_ci 0 or 0.0f is returned. If <obj> is not of type PROGRAM_OBJECT_ARB the 15935bd8deadSopenharmony_ci error INVALID_OPERATION is generated. 15945bd8deadSopenharmony_ci 15955bd8deadSopenharmony_ci If <pname> is OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB, 15965bd8deadSopenharmony_ci GetObjectParameter{if}vARB returns the length of the longest active 15975bd8deadSopenharmony_ci attribute name, including a null termination. If no active attributes 15985bd8deadSopenharmony_ci exist, 0 or 0.0f is returned. If <obj> is not of type PROGRAM_OBJECT_ARB 15995bd8deadSopenharmony_ci the error INVALID_OPERATION is generated. 16005bd8deadSopenharmony_ci 16015bd8deadSopenharmony_ci The commands 16025bd8deadSopenharmony_ci 16035bd8deadSopenharmony_ci void GetVertexAttribdvARB(uint index, enum pname, double *params) 16045bd8deadSopenharmony_ci void GetVertexAttribfvARB(uint index, enum pname, float *params) 16055bd8deadSopenharmony_ci void GetVertexAttribivARB(uint index, enum pname, int *params) 16065bd8deadSopenharmony_ci 16075bd8deadSopenharmony_ci obtain the vertex attribute state named by <pname> for the generic 16085bd8deadSopenharmony_ci vertex attribute numbered <index> and places the information in the 16095bd8deadSopenharmony_ci array <params>. <pname> must be one of VERTEX_ATTRIB_ARRAY_ENABLED_ARB, 16105bd8deadSopenharmony_ci VERTEX_ATTRIB_ARRAY_SIZE_ARB, VERTEX_ATTRIB_ARRAY_STRIDE_ARB, 16115bd8deadSopenharmony_ci VERTEX_ATTRIB_ARRAY_TYPE_ARB, VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB, or 16125bd8deadSopenharmony_ci CURRENT_VERTEX_ATTRIB_ARB. Note that all the queries except 16135bd8deadSopenharmony_ci CURRENT_VERTEX_ATTRIB_ARB return client state. The error INVALID_VALUE 16145bd8deadSopenharmony_ci is generated if <index> is greater than or equal to 16155bd8deadSopenharmony_ci MAX_VERTEX_ATTRIBS_ARB. 16165bd8deadSopenharmony_ci 16175bd8deadSopenharmony_ci All but the last query return information about generic vertex attribute 16185bd8deadSopenharmony_ci arrays. The enable state of a generic vertex attribute array is set by 16195bd8deadSopenharmony_ci the command EnableVertexAttribArrayARB and cleared by 16205bd8deadSopenharmony_ci DisableVertexAttribArrayARB. The size, stride, type and normalized flag 16215bd8deadSopenharmony_ci are set by the command VertexAttribPointerARB. The query 16225bd8deadSopenharmony_ci CURRENT_VERTEX_ATTRIB_ARB returns the current value for the generic 16235bd8deadSopenharmony_ci attribute <index>. In this case the error INVALID_OPERATION is generated 16245bd8deadSopenharmony_ci if <index> is zero, as there is no current value for generic attribute 16255bd8deadSopenharmony_ci zero. 16265bd8deadSopenharmony_ci 16275bd8deadSopenharmony_ci Note that all the queries except CURRENT_VERTEX_ATTRIB_ARB return client 16285bd8deadSopenharmony_ci state. The error INVALID_VALUE is generated if <index> is greater than 16295bd8deadSopenharmony_ci or equal to MAX_VERTEX_ATTRIBS_ARB. 16305bd8deadSopenharmony_ci 16315bd8deadSopenharmony_ci The command 16325bd8deadSopenharmony_ci 16335bd8deadSopenharmony_ci void GetVertexAttribPointervARB(uint index, enum pname, 16345bd8deadSopenharmony_ci void **pointer) 16355bd8deadSopenharmony_ci 16365bd8deadSopenharmony_ci obtains the pointer named <pname> for vertex attribute numbered <index> 16375bd8deadSopenharmony_ci and places the information in the array <pointer>. <pname> must be 16385bd8deadSopenharmony_ci VERTEX_ATTRIB_ARRAY_POINTER_ARB. The INVALID_VALUE error is generated if 16395bd8deadSopenharmony_ci <index> is greater than or equal to MAX_VERTEX_ATTRIBS_ARB. 16405bd8deadSopenharmony_ci 16415bd8deadSopenharmony_ciAdditions to Appendix A of the OpenGL 1.4 Specification (Invariance) 16425bd8deadSopenharmony_ci 16435bd8deadSopenharmony_ci Add to end of Section A.3 (p. 250): 16445bd8deadSopenharmony_ci 16455bd8deadSopenharmony_ci The same vertex shader will produce the same result when run multiple 16465bd8deadSopenharmony_ci times with the same input. The wording 'the same shader' means a program 16475bd8deadSopenharmony_ci object that is populated with the same source strings, which are 16485bd8deadSopenharmony_ci compiled and then linked, possibly multiple times. This program object 16495bd8deadSopenharmony_ci is then executed using the same GL state vector. 16505bd8deadSopenharmony_ci 16515bd8deadSopenharmony_ciAdditions to the AGL/GLX/WGL Specifications 16525bd8deadSopenharmony_ci 16535bd8deadSopenharmony_ci None 16545bd8deadSopenharmony_ci 16555bd8deadSopenharmony_ciInteractions with ARB_vertex_program and ARB_fragment_program 16565bd8deadSopenharmony_ci 16575bd8deadSopenharmony_ci Mixing a high level ARB_vertex_shader shader with a low level 16585bd8deadSopenharmony_ci ARB_fragment_program shader is allowed. However, a high level 16595bd8deadSopenharmony_ci ARB_vertex_shader shader and a low level ARB_vertex_program shader 16605bd8deadSopenharmony_ci cannot be active at the same time. 16615bd8deadSopenharmony_ci 16625bd8deadSopenharmony_ciInteractions with ARB_vertex_program 16635bd8deadSopenharmony_ci 16645bd8deadSopenharmony_ci Enabling an ARB_vertex_shader shader by issuing the command 16655bd8deadSopenharmony_ci UseProgramObjectARB(), with a handle which is not zero, results in any 16665bd8deadSopenharmony_ci low level vertex shader to be ignored and overrides the enable 16675bd8deadSopenharmony_ci VERTEX_PROGRAM_ARB. Note that the value for VERTEX_PROGRAM_ARB does not 16685bd8deadSopenharmony_ci change by installing an ARB_vertex_shader shader. 16695bd8deadSopenharmony_ci 16705bd8deadSopenharmony_ci The following enums and entry points are re-used from 16715bd8deadSopenharmony_ci ARB_vertex_program: 16725bd8deadSopenharmony_ci 16735bd8deadSopenharmony_ci MAX_VERTEX_ATTRIBS_ARB 0x8869 16745bd8deadSopenharmony_ci VERTEX_ATTRIB_ARRAY_ENABLED_ARB 0x8622 16755bd8deadSopenharmony_ci VERTEX_ATTRIB_ARRAY_SIZE_ARB 0x8623 16765bd8deadSopenharmony_ci VERTEX_ATTRIB_ARRAY_STRIDE_ARB 0x8624 16775bd8deadSopenharmony_ci VERTEX_ATTRIB_ARRAY_TYPE_ARB 0x8625 16785bd8deadSopenharmony_ci VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB 0x886A 16795bd8deadSopenharmony_ci CURRENT_VERTEX_ATTRIB_ARB 0x8626 16805bd8deadSopenharmony_ci VERTEX_ATTRIB_ARRAY_POINTER_ARB 0x8645 16815bd8deadSopenharmony_ci VERTEX_PROGRAM_TWO_SIDE_ARB 0x8643 16825bd8deadSopenharmony_ci VERTEX_PROGRAM_POINT_SIZE_ARB 0x8642 16835bd8deadSopenharmony_ci 16845bd8deadSopenharmony_ci VertexAttrib*ARB 16855bd8deadSopenharmony_ci VertexAttribPointerARB 16865bd8deadSopenharmony_ci EnableVertexAttribArrayARB 16875bd8deadSopenharmony_ci DisableVertexAttribArrayARB 16885bd8deadSopenharmony_ci GetVertexAttrib*ARB 16895bd8deadSopenharmony_ci GetVertexAttribPointervARB 16905bd8deadSopenharmony_ci 16915bd8deadSopenharmony_ci The ARB_vertex_program extension is modified to turn undefined vertex 16925bd8deadSopenharmony_ci attribute aliasing into non-aliasing. That means that generic vertex 16935bd8deadSopenharmony_ci attributes and conventional attributes do not alias on top of each 16945bd8deadSopenharmony_ci other. 16955bd8deadSopenharmony_ci 16965bd8deadSopenharmony_ci The following edits are against version 36 of the ARB_vertex_program 16975bd8deadSopenharmony_ci specification. 16985bd8deadSopenharmony_ci 16995bd8deadSopenharmony_ci * Section 2.7. Delete the paragraph above Table X.1, Generic and 17005bd8deadSopenharmony_ci Conventional Attribute Mappings. Add the following sentence in its 17015bd8deadSopenharmony_ci place: "There is no aliasing among generic attributes and 17025bd8deadSopenharmony_ci conventional attributes." 17035bd8deadSopenharmony_ci * Section 2.7. Delete the paragraph below Table X.1 17045bd8deadSopenharmony_ci * Section 2.7. Delete Table X.1. 17055bd8deadSopenharmony_ci * Change the last sentence in Section 2.7 to: "The initial values for 17065bd8deadSopenharmony_ci all generic vertex attributes are (0, 0, 0, 1)." 17075bd8deadSopenharmony_ci * Section 2.8. Edit the paragraph below the pseudo code. Change "As 17085bd8deadSopenharmony_ci described in section 2.7, setting a generic vertex attributes ..." 17095bd8deadSopenharmony_ci into "As described in section 2.7, there is no aliasing among 17105bd8deadSopenharmony_ci generic vertex attributes and conventional attributes". 17115bd8deadSopenharmony_ci * Section 2.14.3.1. Delete the first part of the paragraph above Table 17125bd8deadSopenharmony_ci X.2.1. The new paragraph becomes "A vertex program will fail to load 17135bd8deadSopenharmony_ci if it binds both a conventional vertex attribute and a generic 17145bd8deadSopenharmony_ci vertex attribute listed in the same row of Table X.2.1." 17155bd8deadSopenharmony_ci 17165bd8deadSopenharmony_ciInteractions with ARB_fragment_program 17175bd8deadSopenharmony_ci 17185bd8deadSopenharmony_ci The following enums are re-used from ARB_fragment_program: 17195bd8deadSopenharmony_ci 17205bd8deadSopenharmony_ci MAX_TEXTURE_IMAGE_UNITS_ARB 0x8872 17215bd8deadSopenharmony_ci MAX_TEXTURE_COORDS_ARB 0x8871 17225bd8deadSopenharmony_ci 17235bd8deadSopenharmony_ciInteractions with ARB_vertex_blend 17245bd8deadSopenharmony_ci 17255bd8deadSopenharmony_ci If ARB_vertex_blend is supported, and if a vertex shader is active, the 17265bd8deadSopenharmony_ci executable version of the vertex shader is used to process incoming 17275bd8deadSopenharmony_ci vertex values rather than the fixed functionality vertex blend 17285bd8deadSopenharmony_ci processing described in ARB_vertex_blend. In particular, 17295bd8deadSopenharmony_ci 17305bd8deadSopenharmony_ci * Vertex coordinates are not transformed to eye space as described by 17315bd8deadSopenharmony_ci the equation in Section 2.10 provided by ARB_vertex_blend. 17325bd8deadSopenharmony_ci * Normals are not transformed to eye space as described by the 17335bd8deadSopenharmony_ci equations in Section 2.10.2 provided by ARB_vertex_blend. 17345bd8deadSopenharmony_ci 17355bd8deadSopenharmony_ciInteractions with ARB_matrix_palette 17365bd8deadSopenharmony_ci 17375bd8deadSopenharmony_ci If ARB_matrix_palette is supported, and if a vertex shader is active, 17385bd8deadSopenharmony_ci the executable version of the vertex shader is used to process incoming 17395bd8deadSopenharmony_ci vertex values rather than the fixed functionality matrix processing 17405bd8deadSopenharmony_ci described in ARB_matrix_palette. In particular, 17415bd8deadSopenharmony_ci 17425bd8deadSopenharmony_ci * Vertex coordinates are not transformed to eye space as described by 17435bd8deadSopenharmony_ci the equation in Section 2.10 of the ARB_matrix_palette 17445bd8deadSopenharmony_ci specification. 17455bd8deadSopenharmony_ci * Normals are not transformed to eye space as described by the 17465bd8deadSopenharmony_ci equations in Section 2.10.3 of the ARB_matrix_palette specification. 17475bd8deadSopenharmony_ci 17485bd8deadSopenharmony_ciGLX Protocol 17495bd8deadSopenharmony_ci 17505bd8deadSopenharmony_ci The ARB_vertex_program extension defines GLX protocol for the following 17515bd8deadSopenharmony_ci rendering commands. 17525bd8deadSopenharmony_ci 17535bd8deadSopenharmony_ci VertexAttrib1fvARB, VertexAttrib1svARB, VertexAttrib1dvARB, 17545bd8deadSopenharmony_ci VertexAttrib2fvARB, VertexAttrib2svARB, VertexAttrib2dvARB, 17555bd8deadSopenharmony_ci VertexAttrib3fvARB, VertexAttrib3svARB, VertexAttrib3dvARB, 17565bd8deadSopenharmony_ci VertexAttrib4fvARB, VertexAttrib4svARB, VertexAttrib4dvARB, 17575bd8deadSopenharmony_ci VertexAttrib4ivARB, VertexAttrib4bvARB, VertexAttrib4ubvARB, 17585bd8deadSopenharmony_ci VertexAttrib4usvARB, VertexAttrib4uivARB, VertexAttrib4NbvARB, 17595bd8deadSopenharmony_ci VertexAttrib4NsvARB, VertexAttrib4NivARB, VertexAttrib4NubvARB, 17605bd8deadSopenharmony_ci VertexAttrib4NusvARB, VertexAttrib4NuivARB 17615bd8deadSopenharmony_ci 17625bd8deadSopenharmony_ci The following rendering commands are sent to the server as part of a 17635bd8deadSopenharmony_ci glXRender request: 17645bd8deadSopenharmony_ci 17655bd8deadSopenharmony_ci BindAttribLocationARB 17665bd8deadSopenharmony_ci 17675bd8deadSopenharmony_ci 2 12+n+p rendering command length 17685bd8deadSopenharmony_ci 2 265 rendering command opcode 17695bd8deadSopenharmony_ci 4 CARD32 programObj 17705bd8deadSopenharmony_ci 4 CARD32 index 17715bd8deadSopenharmony_ci n LISTofBYTE name, n = strlen(name) + 1 17725bd8deadSopenharmony_ci p unused, p = pad(n) 17735bd8deadSopenharmony_ci 17745bd8deadSopenharmony_ci The following non-rendering commands are added. 17755bd8deadSopenharmony_ci 17765bd8deadSopenharmony_ci GetActiveAttribARB 17775bd8deadSopenharmony_ci 17785bd8deadSopenharmony_ci 1 CARD8 opcode (X assigned) 17795bd8deadSopenharmony_ci 1 179 GLX opcode 17805bd8deadSopenharmony_ci 2 5 request length 17815bd8deadSopenharmony_ci 4 GLX_CONTEXT_TAG context tag 17825bd8deadSopenharmony_ci 4 CARD32 programObj 17835bd8deadSopenharmony_ci 4 CARD32 index 17845bd8deadSopenharmony_ci 4 CARD32 maxLength 17855bd8deadSopenharmony_ci => 17865bd8deadSopenharmony_ci 1 1 reply 17875bd8deadSopenharmony_ci 1 unused 17885bd8deadSopenharmony_ci 2 CARD16 sequence number 17895bd8deadSopenharmony_ci 4 m reply length, m = (n+p)/4 17905bd8deadSopenharmony_ci 4 unused 17915bd8deadSopenharmony_ci 4 CARD32 n 17925bd8deadSopenharmony_ci 4 INT32 size 17935bd8deadSopenharmony_ci 4 ENUM type 17945bd8deadSopenharmony_ci 8 unused 17955bd8deadSopenharmony_ci n LISTofBYTE name, n = length+1 17965bd8deadSopenharmony_ci p unused , p = pad(n) 17975bd8deadSopenharmony_ci 17985bd8deadSopenharmony_ci Note that n may be zero, indicating that a GL error occured. 17995bd8deadSopenharmony_ci 18005bd8deadSopenharmony_ci GetAttribLocationARB 18015bd8deadSopenharmony_ci 18025bd8deadSopenharmony_ci 1 CARD8 opcode (X assigned) 18035bd8deadSopenharmony_ci 1 180 GLX opcode 18045bd8deadSopenharmony_ci 2 (12+n+p)/4 request length, n = strlen(name) + 1 18055bd8deadSopenharmony_ci 4 GLX_CONTEXT_TAG context tag 18065bd8deadSopenharmony_ci 4 CARD32 programObj 18075bd8deadSopenharmony_ci n LISTofBYTE name 18085bd8deadSopenharmony_ci p unused, p = pad(n) 18095bd8deadSopenharmony_ci => 18105bd8deadSopenharmony_ci 1 1 reply 18115bd8deadSopenharmony_ci 1 unused 18125bd8deadSopenharmony_ci 2 CARD16 sequence number 18135bd8deadSopenharmony_ci 4 0 reply length 18145bd8deadSopenharmony_ci 4 INT32 return value 18155bd8deadSopenharmony_ci 20 unused 18165bd8deadSopenharmony_ci 18175bd8deadSopenharmony_ci GetVertexAttribdvARB 18185bd8deadSopenharmony_ci 18195bd8deadSopenharmony_ci 1 CARD32 opcode (X assigned) 18205bd8deadSopenharmony_ci 1 181 GLX opcode 18215bd8deadSopenharmony_ci 2 4 request length 18225bd8deadSopenharmony_ci 4 GLX_CONTEXT_TAG context tag 18235bd8deadSopenharmony_ci 4 CARD32 index 18245bd8deadSopenharmony_ci 4 ENUM pname 18255bd8deadSopenharmony_ci => 18265bd8deadSopenharmony_ci 1 1 reply 18275bd8deadSopenharmony_ci 1 unused 18285bd8deadSopenharmony_ci 2 CARD16 sequence number 18295bd8deadSopenharmony_ci 4 m reply length, m = ((n == 1) ? 0 : 2*n) 18305bd8deadSopenharmony_ci 4 unused 18315bd8deadSopenharmony_ci 4 CARD32 n 18325bd8deadSopenharmony_ci 18335bd8deadSopenharmony_ci if (n = 1) this follows: 18345bd8deadSopenharmony_ci 18355bd8deadSopenharmony_ci 8 FL0AT64 params 18365bd8deadSopenharmony_ci 8 unused 18375bd8deadSopenharmony_ci 18385bd8deadSopenharmony_ci otherwise this follows: 18395bd8deadSopenharmony_ci 18405bd8deadSopenharmony_ci 16 unused 18415bd8deadSopenharmony_ci 8*n LISTofFLOAT64 params 18425bd8deadSopenharmony_ci 18435bd8deadSopenharmony_ci The ARB_vertex_program extension defines GLX protocol for the following 18445bd8deadSopenharmony_ci non-rendering commands. 18455bd8deadSopenharmony_ci 18465bd8deadSopenharmony_ci GetVertexAttribfvARB and GetVertexAttribivARB. 18475bd8deadSopenharmony_ci 18485bd8deadSopenharmony_ci The following are entirely client-side commands and do not 18495bd8deadSopenharmony_ci require GLX protocol. 18505bd8deadSopenharmony_ci 18515bd8deadSopenharmony_ci GetVertexAttribPointervARB, VertexAttribPointerARB 18525bd8deadSopenharmony_ci EnableVertexAttribArrayARB, DisableVertexAttribArrayARB 18535bd8deadSopenharmony_ci 18545bd8deadSopenharmony_ciErrors 18555bd8deadSopenharmony_ci 18565bd8deadSopenharmony_ci The error INVALID_VALUE is generated by any command that takes one or 18575bd8deadSopenharmony_ci more handles as input, and one or more handles are not an object handle 18585bd8deadSopenharmony_ci generated by OpenGL. 18595bd8deadSopenharmony_ci 18605bd8deadSopenharmony_ci The error INVALID_VALUE is generated by any of the VertexAttrib*ARB 18615bd8deadSopenharmony_ci commands if <index> is equal or greater than MAX_VERTEX_ATTRIBS_ARB. 18625bd8deadSopenharmony_ci 18635bd8deadSopenharmony_ci The error INVALID_VALUE is generated by VertexAttribPointerARB if 18645bd8deadSopenharmony_ci <index> is equal or greater than MAX_VERTEX_ATTRIBS_ARB. 18655bd8deadSopenharmony_ci 18665bd8deadSopenharmony_ci The error INVALID_VALUE is generated by VertexAttribPointerARB if <size> 18675bd8deadSopenharmony_ci is not one of 1, 2, 3, or 4. 18685bd8deadSopenharmony_ci 18695bd8deadSopenharmony_ci The error INVALID_VALUE is generated by VertexAttribPointerARB if 18705bd8deadSopenharmony_ci <stride> is negative. 18715bd8deadSopenharmony_ci 18725bd8deadSopenharmony_ci The error INVALID_VALUE is generated by EnableVertexAttribArrayARB or 18735bd8deadSopenharmony_ci DisableVertexAttribArrayARB if <index> is greater than or equal to 18745bd8deadSopenharmony_ci MAX_VERTEX_ATTRIBS_ARB. 18755bd8deadSopenharmony_ci 18765bd8deadSopenharmony_ci The error INVALID_OPERATION is generated by any command accessing 18775bd8deadSopenharmony_ci texture coordinate processing state if the texture unit number 18785bd8deadSopenharmony_ci corresponding to the current value of ACTIVE_TEXTURE is greater than or 18795bd8deadSopenharmony_ci equal to the implementation-dependent constant MAX_TEXTURE_COORDS_ARB. 18805bd8deadSopenharmony_ci 18815bd8deadSopenharmony_ci The error INVALID_OPERATION is generated by any command accessing 18825bd8deadSopenharmony_ci texture image processing state if the texture unit number corresponding 18835bd8deadSopenharmony_ci to the current value of ACTIVE_TEXTURE is greater than or equal to the 18845bd8deadSopenharmony_ci implementation-dependent constant MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB. 18855bd8deadSopenharmony_ci 18865bd8deadSopenharmony_ci The error INVALID_OPERATION is generated by GetActiveAttribARB if 18875bd8deadSopenharmony_ci <programObj> is not of type PROGRAM_OBJECT_ARB. 18885bd8deadSopenharmony_ci 18895bd8deadSopenharmony_ci The error INVALID_VALUE is generated by GetActiveAttribARB if <index> is 18905bd8deadSopenharmony_ci greater than or equal to OBJECT_ACTIVE_ATTRIBUTES_ARB. 18915bd8deadSopenharmony_ci 18925bd8deadSopenharmony_ci The error INVALID_OPERATION is generated by GetAttribLocationARB if 18935bd8deadSopenharmony_ci <programObj> is not of type PROGRAM_OBJECT_ARB or if <programObj> has 18945bd8deadSopenharmony_ci not been linked successfully. 18955bd8deadSopenharmony_ci 18965bd8deadSopenharmony_ci The error INVALID_OPERATION is generated by BindAttribLocationARB if 18975bd8deadSopenharmony_ci <name> starts with the reserved "gl_" prefix. 18985bd8deadSopenharmony_ci 18995bd8deadSopenharmony_ci The error INVALID_VALUE is generated by BindAttribLocationARB if <index> 19005bd8deadSopenharmony_ci is equal or greater than MAX_VERTEX_ATTRIBS_ARB. 19015bd8deadSopenharmony_ci 19025bd8deadSopenharmony_ci The error INVALID_OPERATION is generated by BindAttribLocationARB if 19035bd8deadSopenharmony_ci <programObj> is not of type PROGRAM_OBJECT_ARB. 19045bd8deadSopenharmony_ci 19055bd8deadSopenharmony_ci The error INVALID_OPERATION is generated by GetObjectParameter{if}vARB 19065bd8deadSopenharmony_ci if <pname> is OBJECT_ACTIVE_ATTRIBUTES_ARB or 19075bd8deadSopenharmony_ci OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB and <obj> is not of type 19085bd8deadSopenharmony_ci PROGRAM_OBJECT_ARB. 19095bd8deadSopenharmony_ci 19105bd8deadSopenharmony_ci The error INVALID_OPERATION is generated by GetObjectParameter{if}vARB 19115bd8deadSopenharmony_ci if <pname> is OBJECT_SUBTYPE_ARB and <obj> is not of type 19125bd8deadSopenharmony_ci SHADER_OBJECT_ARB. 19135bd8deadSopenharmony_ci 19145bd8deadSopenharmony_ci The error INVALID_OPERATION is generated by GetVertexAttrib*ARB if 19155bd8deadSopenharmony_ci <index> is zero and <pname> is CURRENT_VERTEX_ATTRIB_ARB. 19165bd8deadSopenharmony_ci 19175bd8deadSopenharmony_ci The error INVALID_VALUE is generated by GetVertexAttrib*ARB if <index> 19185bd8deadSopenharmony_ci is greater than or equal to MAX_VERTEX_ATTRIBS_ARB. 19195bd8deadSopenharmony_ci 19205bd8deadSopenharmony_ci The error INVALID_VALUE is generated by GetVertexAttribPointervARB if 19215bd8deadSopenharmony_ci <index> is equal or greater than MAX_VERTEX_ATTRIBS_ARB. 19225bd8deadSopenharmony_ci 19235bd8deadSopenharmony_ciNew State 19245bd8deadSopenharmony_ci Initial 19255bd8deadSopenharmony_ci Get Value Type Get Command Value Description Sec. Attribute 19265bd8deadSopenharmony_ci --------- ---- ------------------------- ------- ----------- ---- --------- 19275bd8deadSopenharmony_ci VERTEX_PROGRAM_TWO_SIDE_ARB B IsEnabled False two-sided color mode 2.13.1 enable 19285bd8deadSopenharmony_ci CURRENT_VERTEX_ATTRIB_ARB 16+xR4 GetVertexAttributeARB (0,0,0,1) generic vertex attribute 2.7 current 19295bd8deadSopenharmony_ci VERTEX_PROGRAM_POINT_SIZE_ARB B IsEnabled False point size mode 3.3 enable 19305bd8deadSopenharmony_ci 19315bd8deadSopenharmony_ci Table X. New Accessible State Introduced by ARB_vertex_shader 19325bd8deadSopenharmony_ci 19335bd8deadSopenharmony_ci 19345bd8deadSopenharmony_ci Get Value Type Get Command Initial Value Description Section Attribute 19355bd8deadSopenharmony_ci ------------------------------- ------ ------------- ------------- ------------------ ------- ------------ 19365bd8deadSopenharmony_ci VERTEX_ATTRIB_ARRAY_ENABLED_ARB 16+xB GetVertex- False vertex attrib 2.8 vertex-array 19375bd8deadSopenharmony_ci AttribARB array enable 19385bd8deadSopenharmony_ci VERTEX_ATTRIB_ARRAY_SIZE_ARB 16+xZ GetVertex- 4 vertex attrib 2.8 vertex-array 19395bd8deadSopenharmony_ci AttribARB array size 19405bd8deadSopenharmony_ci VERTEX_ATTRIB_ARRAY_STRIDE_ARB 16+xZ+ GetVertex- 0 vertex attrib 2.8 vertex-array 19415bd8deadSopenharmony_ci AttributeARB array stride 19425bd8deadSopenharmony_ci VERTEX_ATTRIB_ARRAY_TYPE_ARB 16+xZ4 GetVertex- FLOAT vertex attrib 2.8 vertex-array 19435bd8deadSopenharmony_ci AttributeARB array type 19445bd8deadSopenharmony_ci VERTEX_ATTRIB_ARRAY_ 16+xB GetVertex- False vertex attrib 2.8 vertex-array 19455bd8deadSopenharmony_ci NORMALIZED_ARB AttributeARB array normalized 19465bd8deadSopenharmony_ci VERTEX_ATTRIB_ARRAY_POINTER_ARB 16+xP GetVertex- NULL vertex attrib 2.8 vertex-array 19475bd8deadSopenharmony_ci AttribPointerARB array pointer 19485bd8deadSopenharmony_ci 19495bd8deadSopenharmony_ci Table X New Accessible Client State Introduced by ARB_vertex_shader 19505bd8deadSopenharmony_ci 19515bd8deadSopenharmony_ci Initial 19525bd8deadSopenharmony_ci Get Value Type Get Command Value Description Sec. Attribute 19535bd8deadSopenharmony_ci --------- ----- ----------------------- ------------- ----------- ---- --------- 19545bd8deadSopenharmony_ci OBJECT_TYPE_ARB Z2 GetObjectParameterivARB SHADER_OBJECT_ARB Type of object 2.15.1 - 19555bd8deadSopenharmony_ci OBJECT_SUBTYPE_ARB Z2 GetObjectParameterivARB VERTEX_SHADER_ARB Sub type of object 2.15.1 - 19565bd8deadSopenharmony_ci 19575bd8deadSopenharmony_ci Table X Shader object state. 19585bd8deadSopenharmony_ci 19595bd8deadSopenharmony_ci Initial 19605bd8deadSopenharmony_ci Get Value Type Get Command Value Description Sec. Attribute 19615bd8deadSopenharmony_ci --------- ----- ----------------------- -------- ----------- ---- --------- 19625bd8deadSopenharmony_ci - 0+xZ+ GetActiveAttribARB - Size of active attribute 2.15.2 - 19635bd8deadSopenharmony_ci - 0+xZ+ GetActiveAttribARB - Type of active attribute 2.15.2 - 19645bd8deadSopenharmony_ci - 0+xcharARB GetActiveAttribARB "" Name of active attribute 2.15.2 - 19655bd8deadSopenharmony_ci - 0+xZ GetAttribLocationARB - Location of active generic 2.15.2 - 19665bd8deadSopenharmony_ci attribute 19675bd8deadSopenharmony_ci 512+xR GetUniformARB 0 Uniform value 2.15.3 - 19685bd8deadSopenharmony_ci OBJECT_ACTIVE_ATTRIBUTES_ARB Z+ GetObjectParameterivARB 0 Number of active attributes 2.15.2 - 19695bd8deadSopenharmony_ci OBJECT_ACTIVE_ATTRIBUTES_ 19705bd8deadSopenharmony_ci MAX_LENGTH_ARB Z+ GetObjectParameterivARB 0 Max attribute name length 6.1.12 - 19715bd8deadSopenharmony_ci 19725bd8deadSopenharmony_ci Table X Program object state. 19735bd8deadSopenharmony_ci 19745bd8deadSopenharmony_ci 19755bd8deadSopenharmony_ciNew Implementation Dependent State 19765bd8deadSopenharmony_ci 19775bd8deadSopenharmony_ci Minimum 19785bd8deadSopenharmony_ci Get Value Type Get Command Value Description Sec. Attr. 19795bd8deadSopenharmony_ci --------- ---- ----------- ------- ----------- ---- ----- 19805bd8deadSopenharmony_ci MAX_VERTEX_ATTRIBS_ARB Z+ GetIntegerv 16 Number of active 2.15.2 - 19815bd8deadSopenharmony_ci vertex attributes 19825bd8deadSopenharmony_ci MAX_VERTEX_UNIFORM_COMPONENTS_ARB Z+ GetIntegerv 512 Number of words 2.15.3 - 19835bd8deadSopenharmony_ci for vertex shader 19845bd8deadSopenharmony_ci uniform variables 19855bd8deadSopenharmony_ci MAX_VARYING_FLOATS_ARB Z+ GetIntegerv 32 Number of floats 2.15.4 - 19865bd8deadSopenharmony_ci for interpolated 19875bd8deadSopenharmony_ci (varying) variables 19885bd8deadSopenharmony_ci MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB Z+ GetIntegerv 2 Number of texture image 2.15.5 - 19895bd8deadSopenharmony_ci units that can be accessed 19905bd8deadSopenharmony_ci by a vertex shader and the 19915bd8deadSopenharmony_ci fragment processing part of 19925bd8deadSopenharmony_ci OpenGL combined. 19935bd8deadSopenharmony_ci MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB Z+ GetIntegerv 0 Number of separate 2.15.5 - 19945bd8deadSopenharmony_ci texture units that can 19955bd8deadSopenharmony_ci be accessed by a vertex 19965bd8deadSopenharmony_ci shader. 19975bd8deadSopenharmony_ci MAX_TEXTURE_IMAGE_UNITS_ARB Z+ GetIntegerv 2 Number of separate 2.15.5 - 19985bd8deadSopenharmony_ci texture units that can 19995bd8deadSopenharmony_ci be accessed by the fragment 20005bd8deadSopenharmony_ci processing part of OpenGL. 20015bd8deadSopenharmony_ci MAX_TEXTURE_COORDS_ARB Z+ GetIntegerv 2 Number of texture 2.7 - 20025bd8deadSopenharmony_ci coordinate sets 20035bd8deadSopenharmony_ci 20045bd8deadSopenharmony_ci Table X New Implementation Dependent State Introduced by ARB_vertex_shader 20055bd8deadSopenharmony_ci 20065bd8deadSopenharmony_ciSample Usage 20075bd8deadSopenharmony_ci 20085bd8deadSopenharmony_ci GLboolean init(GLcharARB *vertexShader) 20095bd8deadSopenharmony_ci { 20105bd8deadSopenharmony_ci GLcharARB *pInfoLog; 20115bd8deadSopenharmony_ci GLboolean compiled = GL_FALSE; 20125bd8deadSopenharmony_ci GLboolean linked = GL_FALSE; 20135bd8deadSopenharmony_ci GLint length, maxLength; 20145bd8deadSopenharmony_ci 20155bd8deadSopenharmony_ci // 20165bd8deadSopenharmony_ci // Create shader and program objects. 20175bd8deadSopenharmony_ci // 20185bd8deadSopenharmony_ci ProgramObject = glCreateProgramObjectARB(); 20195bd8deadSopenharmony_ci VertexShaderObject = glCreateShaderObjectARB(GL_VERTEX_SHADER_ARB); 20205bd8deadSopenharmony_ci 20215bd8deadSopenharmony_ci length = strlen(vertexShader); 20225bd8deadSopenharmony_ci glShaderSourceARB(VertexShaderObject, 1, &vertexShader, &length); 20235bd8deadSopenharmony_ci 20245bd8deadSopenharmony_ci // 20255bd8deadSopenharmony_ci // OpenGL made a copy of the shader, we can free our copy 20265bd8deadSopenharmony_ci // 20275bd8deadSopenharmony_ci free(vertexShader); 20285bd8deadSopenharmony_ci 20295bd8deadSopenharmony_ci // 20305bd8deadSopenharmony_ci // Compile the vertex shader, and print out the compiler log file. 20315bd8deadSopenharmony_ci // 20325bd8deadSopenharmony_ci glCompileShaderARB(VertexShaderObject); 20335bd8deadSopenharmony_ci glGetObjectParameterivARB(VertexShaderObject, 20345bd8deadSopenharmony_ci GL_OBJECT_COMPILE_STATUS_ARB, &compiled); 20355bd8deadSopenharmony_ci 20365bd8deadSopenharmony_ci glGetObjectParameterivARB(VertexShaderObject, 20375bd8deadSopenharmony_ci GL_OBJECT_INFO_LOG_LENGTH_ARB, &maxLength); 20385bd8deadSopenharmony_ci pInfoLog = (GLcharARB *) malloc(maxLength * sizeof(GLcharARB)); 20395bd8deadSopenharmony_ci glGetInfoLogARB(VertexShaderObject, maxLength, &length, pInfoLog); 20405bd8deadSopenharmony_ci 20415bd8deadSopenharmony_ci printf("%s\n", pInfoLog); 20425bd8deadSopenharmony_ci free(pInfoLog); 20435bd8deadSopenharmony_ci 20445bd8deadSopenharmony_ci if (!compiled) { 20455bd8deadSopenharmony_ci printf("Compile failed\n"); 20465bd8deadSopenharmony_ci return GL_FALSE; 20475bd8deadSopenharmony_ci } 20485bd8deadSopenharmony_ci 20495bd8deadSopenharmony_ci // 20505bd8deadSopenharmony_ci // Populate the program object with the compiled shader 20515bd8deadSopenharmony_ci // 20525bd8deadSopenharmony_ci glAttachObjectARB(ProgramObject, VertexShaderObject); 20535bd8deadSopenharmony_ci 20545bd8deadSopenharmony_ci // 20555bd8deadSopenharmony_ci // We want the shader object to go away as soon as it is detached 20565bd8deadSopenharmony_ci // from the program object it is attached to. We can call delete now 20575bd8deadSopenharmony_ci // to achieve that. Note that calling delete on a program object 20585bd8deadSopenharmony_ci // will result in all shaders attached to that program object to be 20595bd8deadSopenharmony_ci // detached. If delete has been called for the shader object, 20605bd8deadSopenharmony_ci // calling delete on the program object will result in the shader 20615bd8deadSopenharmony_ci // object being deleted as well. 20625bd8deadSopenharmony_ci // 20635bd8deadSopenharmony_ci glDeleteObjectARB(VertexShaderObject); 20645bd8deadSopenharmony_ci 20655bd8deadSopenharmony_ci // 20665bd8deadSopenharmony_ci // Bind user attributes before linking the program object. 20675bd8deadSopenharmony_ci // 20685bd8deadSopenharmony_ci glBindAttribLocationARB(ProgramObject, 1, "myFirstAttribute"); 20695bd8deadSopenharmony_ci glBindAttribLocationARB(ProgramObject, 2, "mySecondAttribute"); 20705bd8deadSopenharmony_ci 20715bd8deadSopenharmony_ci // 20725bd8deadSopenharmony_ci // Link the program and print out the linker log file 20735bd8deadSopenharmony_ci // 20745bd8deadSopenharmony_ci glLinkProgramARB(ProgramObject); 20755bd8deadSopenharmony_ci glGetObjectParameterivARB(ProgramObject, GL_OBJECT_LINK_STATUS_ARB, 20765bd8deadSopenharmony_ci &linked); 20775bd8deadSopenharmony_ci 20785bd8deadSopenharmony_ci glGetObjectParameterivARB(ProgramObject, 20795bd8deadSopenharmony_ci GL_OBJECT_INFO_LOG_LENGTH_ARB, &maxLength); 20805bd8deadSopenharmony_ci pInfoLog = (GLcharARB *) malloc(maxLength * sizeof(GLcharARB)); 20815bd8deadSopenharmony_ci glGetInfoLogARB(ProgramObject, maxLength, &length, pInfoLog); 20825bd8deadSopenharmony_ci 20835bd8deadSopenharmony_ci printf("%s\n", pInfoLog); 20845bd8deadSopenharmony_ci free(pInfoLog); 20855bd8deadSopenharmony_ci 20865bd8deadSopenharmony_ci // 20875bd8deadSopenharmony_ci // If all went well, make the ProgramObject part of the current state 20885bd8deadSopenharmony_ci // 20895bd8deadSopenharmony_ci if (linked) { 20905bd8deadSopenharmony_ci glUseProgramObjectARB(ProgramObject); 20915bd8deadSopenharmony_ci return GL_TRUE; 20925bd8deadSopenharmony_ci } else { 20935bd8deadSopenharmony_ci printf("Link failed\n"); 20945bd8deadSopenharmony_ci return GL_FALSE; 20955bd8deadSopenharmony_ci } 20965bd8deadSopenharmony_ci } 20975bd8deadSopenharmony_ci 20985bd8deadSopenharmony_ci GLhandleARB ProgramObject; 20995bd8deadSopenharmony_ci GLhandleARB VertexShaderObject; 21005bd8deadSopenharmony_ci 21015bd8deadSopenharmony_ci void main() 21025bd8deadSopenharmony_ci { 21035bd8deadSopenharmony_ci GLcharARB *vertexShader; // Holds source for the shader 21045bd8deadSopenharmony_ci int location; // Uniform location 21055bd8deadSopenharmony_ci float uniformData[3] = {0.0, 1.0. 2.0}; 21065bd8deadSopenharmony_ci float vertexData1[3] = {0.0, 1.0. 2.0}; 21075bd8deadSopenharmony_ci float vertexData2[3] = {0.0, 1.0. 2.0}; 21085bd8deadSopenharmony_ci 21095bd8deadSopenharmony_ci // 21105bd8deadSopenharmony_ci // Fill in the source in vertexShader 21115bd8deadSopenharmony_ci // 21125bd8deadSopenharmony_ci . 21135bd8deadSopenharmony_ci . 21145bd8deadSopenharmony_ci 21155bd8deadSopenharmony_ci // 21165bd8deadSopenharmony_ci // Create shader and program objects, setup generic attributes, 21175bd8deadSopenharmony_ci // compile the shader object and link the program object and make it 21185bd8deadSopenharmony_ci // part of the current state. 21195bd8deadSopenharmony_ci // 21205bd8deadSopenharmony_ci init(vertexShader); 21215bd8deadSopenharmony_ci 21225bd8deadSopenharmony_ci // 21235bd8deadSopenharmony_ci // Get the location of someUniformName in the vertex shader, then 21245bd8deadSopenharmony_ci // load its data. 21255bd8deadSopenharmony_ci // 21265bd8deadSopenharmony_ci location = glGetUniformLocationARB(ProgramObject, "someUniformName") 21275bd8deadSopenharmony_ci glUniform3fvARB(location, 1, &uniformData[0]); 21285bd8deadSopenharmony_ci 21295bd8deadSopenharmony_ci // 21305bd8deadSopenharmony_ci // Render 21315bd8deadSopenharmony_ci // 21325bd8deadSopenharmony_ci glBegin(...); 21335bd8deadSopenharmony_ci . 21345bd8deadSopenharmony_ci . 21355bd8deadSopenharmony_ci glVertexAttrib3fvARB(1, vertexData1); 21365bd8deadSopenharmony_ci glVertexAttrib3fvARB(2, vertexData2); 21375bd8deadSopenharmony_ci . 21385bd8deadSopenharmony_ci . 21395bd8deadSopenharmony_ci glEnd(); 21405bd8deadSopenharmony_ci } 21415bd8deadSopenharmony_ci 21425bd8deadSopenharmony_ciRevision History 21435bd8deadSopenharmony_ci 21445bd8deadSopenharmony_ci Revision: 0.5 6/5/2002 21455bd8deadSopenharmony_ci - First draft for circulation 21465bd8deadSopenharmony_ci Revision: 0.51 21475bd8deadSopenharmony_ci - Updated API entry points in the New Procedures and Functions section 21485bd8deadSopenharmony_ci - Named and explained all parameters to all API calls 21495bd8deadSopenharmony_ci - BindAttributeLocationGL2 and GetActiveAttributesGL2 now have a 21505bd8deadSopenharmony_ci length argument for their strings 21515bd8deadSopenharmony_ci - Updated the section that describes state required to support vertex 21525bd8deadSopenharmony_ci specification 21535bd8deadSopenharmony_ci - Changed how standard attribute values are preserved across program 21545bd8deadSopenharmony_ci changes (always preserved) 21555bd8deadSopenharmony_ci - Changed language describing what happens when too few or too many 21565bd8deadSopenharmony_ci attributes are provided 21575bd8deadSopenharmony_ci - Updated the list of OpenGL stages that are and are not replaced by a 21585bd8deadSopenharmony_ci vertex shader 21595bd8deadSopenharmony_ci - Added suggestion for what new vertex array functionality to include 21605bd8deadSopenharmony_ci - Added content to the errors section 21615bd8deadSopenharmony_ci - Expanded the issues section up to and including number 4. 21625bd8deadSopenharmony_ci Revision: 0.52 21635bd8deadSopenharmony_ci - Generic vertex attributes, except for vertex arrays, are loaded 21645bd8deadSopenharmony_ci using the exact same API commands as ARB_vertex_program uses. Added 21655bd8deadSopenharmony_ci discussion of this to the issues section. 21665bd8deadSopenharmony_ci - Changed the vertex array section to be TBD. 21675bd8deadSopenharmony_ci Revision: 0.53 21685bd8deadSopenharmony_ci - Now references V1.0 of the OpenGL Shading Language Specification 21695bd8deadSopenharmony_ci - Fixed minor typos 21705bd8deadSopenharmony_ci - Accepted by the GL2 working group 21715bd8deadSopenharmony_ci Revision: 0.54 10/17/2002 21725bd8deadSopenharmony_ci - Removed IsObjectGL2(). 21735bd8deadSopenharmony_ci - Expanded GetObjectParameter{if}GL2. Added OBJECT_SUBTYPE_GL2. 21745bd8deadSopenharmony_ci Revision: 0.55 10/18/2002 21755bd8deadSopenharmony_ci - The index parameter to BindAttributeLocation is now a uint instead 21765bd8deadSopenharmony_ci of a ubyte. 21775bd8deadSopenharmony_ci - Updated Errors section. 21785bd8deadSopenharmony_ci - Added language disallowing mixing GL2 high level vertex shader with 21795bd8deadSopenharmony_ci low level ARB vertex program or fragment program. 21805bd8deadSopenharmony_ci - Documented interaction with ARB_vertex_blend 21815bd8deadSopenharmony_ci Revision: 0.56 10/18/2002 21825bd8deadSopenharmony_ci - Added vertex array interface, and added an issue discussing it. 21835bd8deadSopenharmony_ci - Changed re-using ARB_vertex_program VertexAttrib*ARB commands issue. 21845bd8deadSopenharmony_ci Revision: 0.57 10/21/2002 21855bd8deadSopenharmony_ci - Changed VA interface to be exactly the same as ARB_vertex_program 21865bd8deadSopenharmony_ci - Replaced MAX_ACTIVE_ATTRIBUTES_GL2 with MAX_VERTEX_ATTRIBS_ARB. 21875bd8deadSopenharmony_ci - Went back to a different set of VertexAttribute*GL2 calls (instead 21885bd8deadSopenharmony_ci of re-using the ARB_vertex_program ones). 21895bd8deadSopenharmony_ci - Updated issues 2 and 3. 21905bd8deadSopenharmony_ci - Added code to the sample usage section. 21915bd8deadSopenharmony_ci Revision: 0.58 10/23/2002 21925bd8deadSopenharmony_ci - Spelled out GetObjectParameter, instead of using 'T value' in its 21935bd8deadSopenharmony_ci parameter list. 21945bd8deadSopenharmony_ci - Fixed usage of const keyword in GetAttributeLocations. 21955bd8deadSopenharmony_ci - Added GetVertexAttribute{ifd}vGL2 21965bd8deadSopenharmony_ci - Added GetVertexAttribPointervARB 21975bd8deadSopenharmony_ci - Updated interactions with ARB_vertex_program section 21985bd8deadSopenharmony_ci - Updated errors section. 21995bd8deadSopenharmony_ci - Moved shader resources section to GL2_shader_objects. 22005bd8deadSopenharmony_ci - Updated chapter 5, Display Lists. 22015bd8deadSopenharmony_ci Revision: 0.6 10/29/2002 22025bd8deadSopenharmony_ci - Fixed typos. 22035bd8deadSopenharmony_ci - Changed Issue three to unresolved. 22045bd8deadSopenharmony_ci - Added issue number four. 22055bd8deadSopenharmony_ci - Second distribution to the GL2 working group. 22065bd8deadSopenharmony_ci - Now written against the OpenGL 1.4 specification. 22075bd8deadSopenharmony_ci Revision: 0.61 11/26/2002 22085bd8deadSopenharmony_ci - Minimum for MAX_VARYING_FLOATS reduced from 40 to 32. 22095bd8deadSopenharmony_ci - Allowed mixing of a high level GL2 vertex shader with a low level 22105bd8deadSopenharmony_ci ARB_fragment_program shader. 22115bd8deadSopenharmony_ci Revision: 0.62 12/04/2002 22125bd8deadSopenharmony_ci - Resolved Issue 5 the same way as ARB_vertex_program. As a result, 22135bd8deadSopenharmony_ci added language to section 5.1. 22145bd8deadSopenharmony_ci Revision: 0.63 1/29/2003 22155bd8deadSopenharmony_ci - Marked issues 2 and 4 as unresolved. 22165bd8deadSopenharmony_ci - Updated list of contributors. 22175bd8deadSopenharmony_ci - Added issue 6, 7, 8, 9. 22185bd8deadSopenharmony_ci - Updated the 'state required' section of section 2.7 and 2.8. 22195bd8deadSopenharmony_ci - Renamed 'user-defined attribute' to 'generic attribute' to match 22205bd8deadSopenharmony_ci ARB_vertex_program terminology. 22215bd8deadSopenharmony_ci - Added language to section 2.13.2 and 2.13.3 about material and 22225bd8deadSopenharmony_ci ColorMaterial handling when a GL2 shader is active. 22235bd8deadSopenharmony_ci - Added wording to section 3.10 for PointSize and Fog. 22245bd8deadSopenharmony_ci - Added a two sided lighting enable to section 2.13.1. 22255bd8deadSopenharmony_ci - Added wording to explain how raster pos works, section 2.12 22265bd8deadSopenharmony_ci - Added and resolved issue 10. Added wording to section 3.9. 22275bd8deadSopenharmony_ci - Added issue 11. 22285bd8deadSopenharmony_ci - Third working group distribution. 22295bd8deadSopenharmony_ci Revision: 0.64 2/03/2003 22305bd8deadSopenharmony_ci - Added VERTEX_PROGRAM_TWO_SIDE_ARB to the new tokens section. 22315bd8deadSopenharmony_ci - Resolved issue 6, 7, 8, 10, 11 and updated the spec to reflect this. 22325bd8deadSopenharmony_ci - Added wording to section 2.11, clipping 22335bd8deadSopenharmony_ci - Updated the New State section 22345bd8deadSopenharmony_ci - Updated the New Tokens section 22355bd8deadSopenharmony_ci - Changed the VertexAttribute*GL2 entry points to VertexAttrib*ARB, 22365bd8deadSopenharmony_ci which are the same entry points as defined in ARB_vertex_program. 22375bd8deadSopenharmony_ci - Made generic attribute zero provoke a vertex 22385bd8deadSopenharmony_ci - Resolved issue 2,3 and 4. Edited the interactions with 22395bd8deadSopenharmony_ci ARB_vertex_program section to reflect this. 22405bd8deadSopenharmony_ci - Consistently used 'conventional attributes' instead of 'standard 22415bd8deadSopenharmony_ci attributes'. 22425bd8deadSopenharmony_ci - Tried to clarify the wording in section 2.15.2 regarding attribute 22435bd8deadSopenharmony_ci tracking. 22445bd8deadSopenharmony_ci - Updated the Errors section 22455bd8deadSopenharmony_ci - Added issue 12, texture access 22465bd8deadSopenharmony_ci - Fourth working group distribution. 22475bd8deadSopenharmony_ci Revision: 0.65 2/10/2003 22485bd8deadSopenharmony_ci - Updated section 5.4, commands excluded from a display list. 22495bd8deadSopenharmony_ci - Added section 2.15.6, position invariance. Renamed the old section 22505bd8deadSopenharmony_ci 2.15.6 to 2.15.7. 22515bd8deadSopenharmony_ci - Added a discussion section to issue 1, invariance 22525bd8deadSopenharmony_ci - Updated Appendix A, invariance 22535bd8deadSopenharmony_ci - Added a proposed resolution to issue 12. Related to that are the new 22545bd8deadSopenharmony_ci issues 13, 14 and 15. 22555bd8deadSopenharmony_ci - Added language to sections 2.7, 2.8, 2.10.2 and 6.1.2 to support 22565bd8deadSopenharmony_ci texture access. 22575bd8deadSopenharmony_ci - Added a new section 2.15.5 to support texture access. 22585bd8deadSopenharmony_ci - Added MAX_FRAGMENT_TEXTURE_UNITS_GL2, MAX_VERTEX_TEXTURE_UNITS_GL2 22595bd8deadSopenharmony_ci and MAX_TEXTURE_IMAGE_UNITS_GL2. 22605bd8deadSopenharmony_ci - Fifth working group distribution 22615bd8deadSopenharmony_ci Revision: 0.66 2/11/2003 22625bd8deadSopenharmony_ci - Added issue 16. Position invariance with respect to user clipping 22635bd8deadSopenharmony_ci and closed it. 22645bd8deadSopenharmony_ci - Closed issue 1. 22655bd8deadSopenharmony_ci - Updated 'implementation dependent state' section. 22665bd8deadSopenharmony_ci - Renamed MAX_VERTEX_UNIFORM_FLOATS_GL2 to 22675bd8deadSopenharmony_ci MAX_VERTEX_UNIFORM_WORDS_GL2. 22685bd8deadSopenharmony_ci - Consistently used 'texture coordinate set' instead of 'texture 22695bd8deadSopenharmony_ci coordinate unit'. 22705bd8deadSopenharmony_ci - Distributed to HP 22715bd8deadSopenharmony_ci Revision: 0.67 2/13/2003 22725bd8deadSopenharmony_ci - Added wording about interaction with ARB_matrix_palette. Same 22735bd8deadSopenharmony_ci applies as the interaction with ARB_vertex_blend. 22745bd8deadSopenharmony_ci - Sixth working group distribution 22755bd8deadSopenharmony_ci Revision: 0.68 2/20/2003 22765bd8deadSopenharmony_ci - Renamed MAX_FRAGMENT_TEXTURE_UNITS_GL2 to 22775bd8deadSopenharmony_ci MAX_TEXTURE_IMAGE_UNITS_ARB 22785bd8deadSopenharmony_ci - Renamed MAX_VERTEX_TEXTURE_UNITS_GL2 to 22795bd8deadSopenharmony_ci MAX_VERTEX_TEXTURE_IMAGE_UNITS_GL2 22805bd8deadSopenharmony_ci - Renamed MAX_TEXTURE_IMAGE_UNITS_GL2 to 22815bd8deadSopenharmony_ci MAX_COMBINED_TEXTURE_IMAGE_UNITS_GL2 22825bd8deadSopenharmony_ci - Added wording to issue 12) explaining how LOD calculation works. 22835bd8deadSopenharmony_ci - Updated section 2.15.5 with respect to LOD calculations. 22845bd8deadSopenharmony_ci - Updated section 2.15.5. Accessing the same texture image unit from a 22855bd8deadSopenharmony_ci vertex shader and fragment processing counts as using two image 22865bd8deadSopenharmony_ci units against the limit MAX_COMBINED_TEXTURE_IMAGE_UNITS_GL2. 22875bd8deadSopenharmony_ci - Updated the interactions with ARB_vertex and fragment_program 22885bd8deadSopenharmony_ci section. 22895bd8deadSopenharmony_ci - Added the 'interactions with ARB_fragment_program' section. 22905bd8deadSopenharmony_ci Revision: 0.69 2/27/2003 22915bd8deadSopenharmony_ci - Updated the interactions with ARB_vertex and fragment_program 22925bd8deadSopenharmony_ci section, again. 22935bd8deadSopenharmony_ci - Updated the texture access section 2.15.5. It is more carefully 22945bd8deadSopenharmony_ci worded and references the relevant texturing sections in chapter 3. 22955bd8deadSopenharmony_ci - Closed issues 2, 3 and 4. Attribute handling. 22965bd8deadSopenharmony_ci - Closed issue 9 and modified section 3.3 to reflect the resolution. 22975bd8deadSopenharmony_ci - Updated texture coordinates to full citizens with respect to their 22985bd8deadSopenharmony_ci dynamic range. Section 2.1.1. ARB_fragment_program already does 22995bd8deadSopenharmony_ci this. 23005bd8deadSopenharmony_ci Revision: 0.70 3/3/2003 23015bd8deadSopenharmony_ci - Treatment of PointSize wasn't complete with respect to point 23025bd8deadSopenharmony_ci attenuation and point fade. Section 3.3. 23035bd8deadSopenharmony_ci - Added issue 17 explaining what happens to point distance attenuation 23045bd8deadSopenharmony_ci and point fade. 23055bd8deadSopenharmony_ci - Texture access now takes the texture object and texture unit bias 23065bd8deadSopenharmony_ci into account as well. See sections 2.15.5 and Section 3.8.8. 23075bd8deadSopenharmony_ci - Fixed numerous small typos and tried to clarify wording here and 23085bd8deadSopenharmony_ci there. 23095bd8deadSopenharmony_ci - It is no longer a requirement to load and/or compile a vertex shader 23105bd8deadSopenharmony_ci before specifying its attribute bindings. 23115bd8deadSopenharmony_ci - Added section 2.15.8 Required State. 23125bd8deadSopenharmony_ci - Rewrote the overview section. 23135bd8deadSopenharmony_ci Revision: 0.71 3/3/2003 23145bd8deadSopenharmony_ci - Upgraded colors to be full floating point citizens, section 2.1.1. 23155bd8deadSopenharmony_ci - Added language about undefined results if a vertex shader does not 23165bd8deadSopenharmony_ci clamp when fixed-function fragment processing is used or an 23175bd8deadSopenharmony_ci ARB_fragment_program target is active. Section 2.15.7. 23185bd8deadSopenharmony_ci - Added issue number 18, explaining color clamping and conversion to 23195bd8deadSopenharmony_ci fixed-point. 23205bd8deadSopenharmony_ci Revision: 0.72 3/31/2003 23215bd8deadSopenharmony_ci - Updated PointSize. Its value is undefined unless written by the 23225bd8deadSopenharmony_ci shader. 23235bd8deadSopenharmony_ci - Changed issue 9. We will have a point size enable after all. 23245bd8deadSopenharmony_ci - Updated IP Status section to point to the contributors agreement. 23255bd8deadSopenharmony_ci - Renamed BindAttributeLocation to BindAttribLocation to be in line 23265bd8deadSopenharmony_ci with the rest of the vertex attribute naming (VertexAttrib etc). 23275bd8deadSopenharmony_ci - Renamed GetActiveAttributes to GetActiveAttribs for the same reason. 23285bd8deadSopenharmony_ci Revision: 0.73 4/9/2003 23295bd8deadSopenharmony_ci - Added to the example usage section. Shows how to use 23305bd8deadSopenharmony_ci GetActiveAttribs. 23315bd8deadSopenharmony_ci - GetActiveAttribs no longer returns the length of the strings. They 23325bd8deadSopenharmony_ci are always null terminated, a length parameter is no longer needed. 23335bd8deadSopenharmony_ci - GetActiveAttribs no longer returns a Boolean. It was never set. 23345bd8deadSopenharmony_ci - Added life time to the pointer returned by GetActiveAttribs. 23355bd8deadSopenharmony_ci - GetActiveAttribs now also returns the type of each attribute. 23365bd8deadSopenharmony_ci - It is no longer a link error if generic attributes are not bound yet 23375bd8deadSopenharmony_ci using BindAttribute. 23385bd8deadSopenharmony_ci - Renamed "handle" to "handleGL2". 23395bd8deadSopenharmony_ci - Updated section 2.15.8 23405bd8deadSopenharmony_ci Revision: 0.74 4/17/2003 23415bd8deadSopenharmony_ci - Added issues 19, 20 and 21. 23425bd8deadSopenharmony_ci - Re-ordered section 2.15.2. Vertex Attributes 23435bd8deadSopenharmony_ci - The GL will assign an index for an attribute variable in a vertex 23445bd8deadSopenharmony_ci shader. This index is queriable using the new GetAttribLocationGL2 23455bd8deadSopenharmony_ci command. 23465bd8deadSopenharmony_ci - Clarified BindAttribLocationGL2. It can override any binding 23475bd8deadSopenharmony_ci assigned by the GL. It can be called at any time. Binding takes 23485bd8deadSopenharmony_ci effect once a program object is (re)linked. 23495bd8deadSopenharmony_ci - Added text that clarifies how to load and bind attributes declared 23505bd8deadSopenharmony_ci as a matrix to section 2.7 and 2.15.2. 23515bd8deadSopenharmony_ci - Clarified issues 1, 7, 8, 9, 11, 18 based on Pat's feedback. I 23525bd8deadSopenharmony_ci didn't change their resolution, just tried to make them clearer. 23535bd8deadSopenharmony_ci - Numerous other small clarifications based on Pat's feedback. 23545bd8deadSopenharmony_ci Revision: 0.75 4/18/2003 23555bd8deadSopenharmony_ci - Made BindAttribLocationGL2 display-listable. 23565bd8deadSopenharmony_ci - Query of active attributes is still allowed after a failed link. 23575bd8deadSopenharmony_ci After all the link could fail because there were too many active 23585bd8deadSopenharmony_ci attributes. 23595bd8deadSopenharmony_ci - Added a size parameter to GetActiveAttribsGL2. 23605bd8deadSopenharmony_ci - Clarified when the linker can generate errors based on incorrect 23615bd8deadSopenharmony_ci user bindings of attributes. 23625bd8deadSopenharmony_ci - More clarification's based on Pat's feedback, most of them in 23635bd8deadSopenharmony_ci section 2.15.2 Vertex Attributes. 23645bd8deadSopenharmony_ci - Re-did section 2.13.1, two sided lighting with a vertex shader 23655bd8deadSopenharmony_ci enabled. 23665bd8deadSopenharmony_ci - Refined the section about aliasing attributes in section 2.15.2. 23675bd8deadSopenharmony_ci - Changed MAX_VERTEX_UNIFORM_WORDS_GL2 to 23685bd8deadSopenharmony_ci MAX_VERTEX_UNIFORM_COMPONENTS_GL2 23695bd8deadSopenharmony_ci Revision: 0.76 4/21/2003 23705bd8deadSopenharmony_ci - Changed a few occurances of "char" to charGL2. 23715bd8deadSopenharmony_ci - GetAttribLocation and BindAttribLocation no longer take a length, 23725bd8deadSopenharmony_ci just like GetUniformLocation. 23735bd8deadSopenharmony_ci - Updated the example section to reflect the latest API changes. 23745bd8deadSopenharmony_ci - Changed the location of the Contributors License to a publicly 23755bd8deadSopenharmony_ci accessible place on www.3dlabs.com. 23765bd8deadSopenharmony_ci - Version approved by the ARB-GL2 working group. 23775bd8deadSopenharmony_ci Revision: 0.77 5/09/2003 23785bd8deadSopenharmony_ci - Fixed issues 17 and 19 where some language was out of sync with the 23795bd8deadSopenharmony_ci actual resolution in the spec. 23805bd8deadSopenharmony_ci - Change 'zero' to NULL in the text describing GetActiveAttribsGL2. 23815bd8deadSopenharmony_ci - Fixed typo in one of the comments in the example section and in the 23825bd8deadSopenharmony_ci revision history. 23835bd8deadSopenharmony_ci - Removed the VertexAttribMatrix*GL2 entry points from the 'new 23845bd8deadSopenharmony_ci procedures and functions' section. These were never intended to be 23855bd8deadSopenharmony_ci part of the spec. 23865bd8deadSopenharmony_ci - Added Kent Lin to the list of contributors. 23875bd8deadSopenharmony_ci - Added state tables. Not all state defined in the spec was present in 23885bd8deadSopenharmony_ci the tables. 23895bd8deadSopenharmony_ci - Section 2.15.8, required state for program objects was incorrect. 23905bd8deadSopenharmony_ci - Clarified the lifetime of the pointers returned by 23915bd8deadSopenharmony_ci GetActiveAttribsGL2. 23925bd8deadSopenharmony_ci - Clarified that you need to pass in three NULL pointers to 23935bd8deadSopenharmony_ci GetActiveAttribsGL2, to only get the count of active attributes. 23945bd8deadSopenharmony_ci - Listed (already defined in the Errors section) error conditions to 23955bd8deadSopenharmony_ci GetActiveUniformsGL2, GetAttribLocationGL2 and 23965bd8deadSopenharmony_ci BindAttribLocationGL2. 23975bd8deadSopenharmony_ci - Updated example section to reflect the latest API names. 23985bd8deadSopenharmony_ci - The first error rule should have been INVALID_VALUE (consistent with 23995bd8deadSopenharmony_ci GL2_shader_objects). 24005bd8deadSopenharmony_ci - Added Jon Leech, Evan Hart, Benjamin Lipchak and Jeremy Sandmel to 24015bd8deadSopenharmony_ci the list of contributors. 24025bd8deadSopenharmony_ci - Removed the two rules from Appendix A (invariance) and updated Issue 24035bd8deadSopenharmony_ci 1 to reflect this. Added the same repeatability rule as the fragment 24045bd8deadSopenharmony_ci shader. 24055bd8deadSopenharmony_ci - Assigned enum values. 24065bd8deadSopenharmony_ci Revision: 0.78 5/15/2003 24075bd8deadSopenharmony_ci - Deleted reference to AppendShader (this call no longer exist). 24085bd8deadSopenharmony_ci - Renamed all GL2 occurrences to ARB. 24095bd8deadSopenharmony_ci - Added SHADER_OBJECT_ARB to the list of new tokens. 24105bd8deadSopenharmony_ci - Fixed typos. 24115bd8deadSopenharmony_ci - Added to the contributors list. If anyone is still left out, let 24125bd8deadSopenharmony_ci Bill Licea Kane, Jon Leech or myself know. 24135bd8deadSopenharmony_ci Revision: 0.79 6/24/2003 24145bd8deadSopenharmony_ci - Changed MAX_VERTEX_TEXTURE_IMAGE_UNITS minimum value to 0 (from 1). 24155bd8deadSopenharmony_ci Updated issue 15 to reflect this. 24165bd8deadSopenharmony_ci - Updates issue 18 (color clamping). As a result, updated Section 24175bd8deadSopenharmony_ci 2.1.1 and 2.15.7. 24185bd8deadSopenharmony_ci - Changed GetActiveAttrib to no longer return a pointer to GL memory. 24195bd8deadSopenharmony_ci This call now returns data for one active attribute, instead of all 24205bd8deadSopenharmony_ci active attributes. As a results, added error conditions to the 24215bd8deadSopenharmony_ci Errors section. 24225bd8deadSopenharmony_ci - BindAttribLocationARB is not display-listable. 24235bd8deadSopenharmony_ci - Added OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB and 24245bd8deadSopenharmony_ci OBJECT_ACTIVE_ATTRIBUTES_ARB as a queriable parameter to 24255bd8deadSopenharmony_ci GetObjectParameter{if}vARB. As a result, changed the New State 24265bd8deadSopenharmony_ci section, and the Required State section. 24275bd8deadSopenharmony_ci - Ordered the Errors section in the order of API commands described in 24285bd8deadSopenharmony_ci the spec. Also split errors in one error per API command. 24295bd8deadSopenharmony_ci - Updated the examples section. 24305bd8deadSopenharmony_ci - General language cleanup. 24315bd8deadSopenharmony_ci - ARB approved version. 24325bd8deadSopenharmony_ci Revision: 0.80 3/16/2004 24335bd8deadSopenharmony_ci - Section 2.15.5 changed that zero or more, and not one or more, 24345bd8deadSopenharmony_ci texture image units are available to a vertex shader. 24355bd8deadSopenharmony_ci - Section 2.15.5 Added language (copied from the fragment shader spec) 24365bd8deadSopenharmony_ci about samplers and depth textures and undefined behavior. Also 24375bd8deadSopenharmony_ci copied the language that specifies what happens when a texture 24385bd8deadSopenharmony_ci object is incomplete. Also copied the language that specifies what 24395bd8deadSopenharmony_ci stays the same with texture operations. 24405bd8deadSopenharmony_ci - Added ARB extension number (31) and edited the status paragraph. 24415bd8deadSopenharmony_ci - Removed SHADER_OBJECT_ARB, OBJECT_TYPE_ARB and OBJECT_SUBTYPE_ARB 24425bd8deadSopenharmony_ci tokens from the New Tokens section. They are already defined in 24435bd8deadSopenharmony_ci ARB_shader_objects. Also removed references to these in Chapter 6, 24445bd8deadSopenharmony_ci GetObjectParameter{fi}v and the Errors section. 24455bd8deadSopenharmony_ci - Changed MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB to 2 (from 3). 24465bd8deadSopenharmony_ci - Changed a typo: OBJECT_ACTIVE_ATTRIBUTES_MAX_LENGTH_ARB should be 24475bd8deadSopenharmony_ci OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB (without the 'S') 24485bd8deadSopenharmony_ci - Specified that the return parameters for GetACtiveAttribARB are 24495bd8deadSopenharmony_ci unmodified when a GL error occurs. 24505bd8deadSopenharmony_ci - Section 2.13.8. Varying variables, not generic vertex attributes, are 24515bd8deadSopenharmony_ci clipped. 24525bd8deadSopenharmony_ci - GetAttribLocationARB() in the 'New Procedures and Functions' section 24535bd8deadSopenharmony_ci takes a handleARB not a handle. 24545bd8deadSopenharmony_ci - Explained the meaning of the parameters to GetVertexAttrib*ARB. 24555bd8deadSopenharmony_ci - Added that the current values of secondary color, fog coord and generic 24565bd8deadSopenharmony_ci attributes are undefined after a call to DrawArrays or DrawElements, if 24575bd8deadSopenharmony_ci the respective arrays are enabled. 24585bd8deadSopenharmony_ci - Added resolution 22. 24595bd8deadSopenharmony_ci - Added a paragraph to section 2.15.2 that makes it a link error to have 24605bd8deadSopenharmony_ci both gl_Vertex an a generic attribute bound to index zero be used in a 24615bd8deadSopenharmony_ci vertex shader. 24625bd8deadSopenharmony_ci Revision: 0.81 3/30/2004 24635bd8deadSopenharmony_ci - Removed ARB from DEPTH_COMPONENT_ARB 24645bd8deadSopenharmony_ci - GetObjectParameter{if}vARB instead of GetObjectParameter{fi}vARB. 24655bd8deadSopenharmony_ci - Updated the version of the Shading Language document referenced to 24665bd8deadSopenharmony_ci 100.53 24675bd8deadSopenharmony_ci - Updated description of MAX_VERTEX_UNIFORM_COMPONENTS_ARB in the 24685bd8deadSopenharmony_ci state tables. 24695bd8deadSopenharmony_ci - Moved spec language related to texture operations not affected by a 24705bd8deadSopenharmony_ci vertex shader to issue 23. 24715bd8deadSopenharmony_ci - ARB-GL2 workgroup approved version. 24725bd8deadSopenharmony_ci Revision 0.82, 12/12/2006 24735bd8deadSopenharmony_ci - Fixed spelling of glGetObjectParameterivARB in sample code. 24745bd8deadSopenharmony_ci Revision 0.83 12/14/2009 24755bd8deadSopenharmony_ci - Added GLX protocol. 24765bd8deadSopenharmony_ci 2477