15bd8deadSopenharmony_ciName 25bd8deadSopenharmony_ci 35bd8deadSopenharmony_ci ARB_vertex_attrib_binding 45bd8deadSopenharmony_ci 55bd8deadSopenharmony_ciName Strings 65bd8deadSopenharmony_ci 75bd8deadSopenharmony_ci GL_ARB_vertex_attrib_binding 85bd8deadSopenharmony_ci 95bd8deadSopenharmony_ciContact 105bd8deadSopenharmony_ci 115bd8deadSopenharmony_ci Jeff Bolz, NVIDIA Corporation (jbolz 'at' nvidia.com) 125bd8deadSopenharmony_ci 135bd8deadSopenharmony_ciContributors 145bd8deadSopenharmony_ci 155bd8deadSopenharmony_ci Pat Brown, NVIDIA 165bd8deadSopenharmony_ci Bruce Merry 175bd8deadSopenharmony_ci Mark Kilgard 185bd8deadSopenharmony_ci 195bd8deadSopenharmony_ciNotice 205bd8deadSopenharmony_ci 215bd8deadSopenharmony_ci Copyright (c) 2012-2013 The Khronos Group Inc. Copyright terms at 225bd8deadSopenharmony_ci http://www.khronos.org/registry/speccopyright.html 235bd8deadSopenharmony_ci 245bd8deadSopenharmony_ciSpecification Update Policy 255bd8deadSopenharmony_ci 265bd8deadSopenharmony_ci Khronos-approved extension specifications are updated in response to 275bd8deadSopenharmony_ci issues and bugs prioritized by the Khronos OpenGL Working Group. For 285bd8deadSopenharmony_ci extensions which have been promoted to a core Specification, fixes will 295bd8deadSopenharmony_ci first appear in the latest version of that core Specification, and will 305bd8deadSopenharmony_ci eventually be backported to the extension document. This policy is 315bd8deadSopenharmony_ci described in more detail at 325bd8deadSopenharmony_ci https://www.khronos.org/registry/OpenGL/docs/update_policy.php 335bd8deadSopenharmony_ci 345bd8deadSopenharmony_ciStatus 355bd8deadSopenharmony_ci 365bd8deadSopenharmony_ci Complete. 375bd8deadSopenharmony_ci Approved by the ARB on 2012/06/12. 385bd8deadSopenharmony_ci 395bd8deadSopenharmony_ciVersion 405bd8deadSopenharmony_ci 415bd8deadSopenharmony_ci Last Modified Date: October 22, 2013 425bd8deadSopenharmony_ci Revision: 5 435bd8deadSopenharmony_ci 445bd8deadSopenharmony_ci EXT_direct_state_access interacton added with revision 3. 455bd8deadSopenharmony_ci 465bd8deadSopenharmony_ciNumber 475bd8deadSopenharmony_ci 485bd8deadSopenharmony_ci ARB Extension #125 495bd8deadSopenharmony_ci 505bd8deadSopenharmony_ciDependencies 515bd8deadSopenharmony_ci 525bd8deadSopenharmony_ci This extension is written against the OpenGL 4.2 Core specification. 535bd8deadSopenharmony_ci 545bd8deadSopenharmony_ci NV_vertex_buffer_unified_memory affects the definition of this 555bd8deadSopenharmony_ci extension. 565bd8deadSopenharmony_ci 575bd8deadSopenharmony_ci EXT_direct_state_access affects the definition of this extension. 585bd8deadSopenharmony_ci 595bd8deadSopenharmony_ci The Compatibility specification affects the definition of this extension. 605bd8deadSopenharmony_ci 615bd8deadSopenharmony_ciOverview 625bd8deadSopenharmony_ci 635bd8deadSopenharmony_ci OpenGL currently supports (at least) 16 vertex attributes and 16 vertex 645bd8deadSopenharmony_ci buffer bindings, with a fixed mapping between vertex attributes and 655bd8deadSopenharmony_ci vertex buffer bindings. This extension allows the application to change 665bd8deadSopenharmony_ci the mapping between attributes and bindings, which can make it more 675bd8deadSopenharmony_ci efficient to update vertex buffer bindings for interleaved vertex formats 685bd8deadSopenharmony_ci where many attributes share the same buffer. 695bd8deadSopenharmony_ci 705bd8deadSopenharmony_ci This extension also separates the vertex binding update from the vertex 715bd8deadSopenharmony_ci attribute format update, which saves applications the effort of 725bd8deadSopenharmony_ci redundantly specifying the same format state over and over. 735bd8deadSopenharmony_ci 745bd8deadSopenharmony_ci Conceptually, this extension splits the state for generic vertex attribute 755bd8deadSopenharmony_ci arrays into: 765bd8deadSopenharmony_ci 775bd8deadSopenharmony_ci - An array of vertex buffer binding points, each of which specifies: 785bd8deadSopenharmony_ci 795bd8deadSopenharmony_ci - a bound buffer object, 805bd8deadSopenharmony_ci 815bd8deadSopenharmony_ci - a starting offset for the vertex attribute data in that buffer object, 825bd8deadSopenharmony_ci 835bd8deadSopenharmony_ci - a stride used by all attributes using that binding point, and 845bd8deadSopenharmony_ci 855bd8deadSopenharmony_ci - a frequency divisor used by all attributes using that binding point. 865bd8deadSopenharmony_ci 875bd8deadSopenharmony_ci - An array of generic vertex attribute format information records, each of 885bd8deadSopenharmony_ci which specifies: 895bd8deadSopenharmony_ci 905bd8deadSopenharmony_ci - a reference to one of the new buffer binding points above, 915bd8deadSopenharmony_ci 925bd8deadSopenharmony_ci - a component count and format, and a normalization flag for the 935bd8deadSopenharmony_ci attribute data, and 945bd8deadSopenharmony_ci 955bd8deadSopenharmony_ci - the offset of the attribute data relative to the base offset of each 965bd8deadSopenharmony_ci vertex found at the associated binding point. 975bd8deadSopenharmony_ci 985bd8deadSopenharmony_ci 995bd8deadSopenharmony_ciNew Procedures and Functions 1005bd8deadSopenharmony_ci 1015bd8deadSopenharmony_ci void BindVertexBuffer(uint bindingindex, uint buffer, intptr offset, 1025bd8deadSopenharmony_ci sizei stride); 1035bd8deadSopenharmony_ci 1045bd8deadSopenharmony_ci void VertexAttribFormat(uint attribindex, int size, enum type, 1055bd8deadSopenharmony_ci boolean normalized, uint relativeoffset); 1065bd8deadSopenharmony_ci void VertexAttribIFormat(uint attribindex, int size, enum type, 1075bd8deadSopenharmony_ci uint relativeoffset); 1085bd8deadSopenharmony_ci void VertexAttribLFormat(uint attribindex, int size, enum type, 1095bd8deadSopenharmony_ci uint relativeoffset); 1105bd8deadSopenharmony_ci 1115bd8deadSopenharmony_ci void VertexAttribBinding(uint attribindex, uint bindingindex); 1125bd8deadSopenharmony_ci 1135bd8deadSopenharmony_ci void VertexBindingDivisor(uint bindingindex, uint divisor); 1145bd8deadSopenharmony_ci 1155bd8deadSopenharmony_ci When EXT_direct_state_access is present: 1165bd8deadSopenharmony_ci 1175bd8deadSopenharmony_ci void VertexArrayBindVertexBufferEXT(uint vaobj, uint bindingindex, uint buffer, intptr offset, 1185bd8deadSopenharmony_ci sizei stride); 1195bd8deadSopenharmony_ci 1205bd8deadSopenharmony_ci void VertexArrayVertexAttribFormatEXT(uint vaobj, uint attribindex, int size, enum type, 1215bd8deadSopenharmony_ci boolean normalized, uint relativeoffset); 1225bd8deadSopenharmony_ci void VertexArrayVertexAttribIFormatEXT(uint vaobj, uint attribindex, int size, enum type, 1235bd8deadSopenharmony_ci uint relativeoffset); 1245bd8deadSopenharmony_ci void VertexArrayVertexAttribLFormatEXT(uint vaobj, uint attribindex, int size, enum type, 1255bd8deadSopenharmony_ci uint relativeoffset); 1265bd8deadSopenharmony_ci 1275bd8deadSopenharmony_ci void VertexArrayVertexAttribBindingEXT(uint vaobj, uint attribindex, uint bindingindex); 1285bd8deadSopenharmony_ci 1295bd8deadSopenharmony_ci void VertexArrayVertexBindingDivisorEXT(uint vaobj, uint bindingindex, uint divisor); 1305bd8deadSopenharmony_ci 1315bd8deadSopenharmony_ciNew Tokens 1325bd8deadSopenharmony_ci 1335bd8deadSopenharmony_ci Accepted by the <pname> parameter of GetVertexAttrib*v: 1345bd8deadSopenharmony_ci 1355bd8deadSopenharmony_ci VERTEX_ATTRIB_BINDING 0x82D4 1365bd8deadSopenharmony_ci VERTEX_ATTRIB_RELATIVE_OFFSET 0x82D5 1375bd8deadSopenharmony_ci 1385bd8deadSopenharmony_ci Accepted by the <target> parameter of GetBooleani_v, GetIntegeri_v, 1395bd8deadSopenharmony_ci GetFloati_v, GetDoublei_v, and GetInteger64i_v: 1405bd8deadSopenharmony_ci 1415bd8deadSopenharmony_ci VERTEX_BINDING_DIVISOR 0x82D6 1425bd8deadSopenharmony_ci VERTEX_BINDING_OFFSET 0x82D7 1435bd8deadSopenharmony_ci VERTEX_BINDING_STRIDE 0x82D8 1445bd8deadSopenharmony_ci VERTEX_BINDING_BUFFER 0x8F4F 1455bd8deadSopenharmony_ci 1465bd8deadSopenharmony_ci Accepted by the <pname> parameter of GetIntegerv, ... 1475bd8deadSopenharmony_ci 1485bd8deadSopenharmony_ci MAX_VERTEX_ATTRIB_RELATIVE_OFFSET 0x82D9 1495bd8deadSopenharmony_ci MAX_VERTEX_ATTRIB_BINDINGS 0x82DA 1505bd8deadSopenharmony_ci 1515bd8deadSopenharmony_ci 1525bd8deadSopenharmony_ciAdditions to Chapter 2 of the OpenGL 2.0 Specification (OpenGL Operation) 1535bd8deadSopenharmony_ci 1545bd8deadSopenharmony_ci Modify Section 2.8, "Vertex Arrays" 1555bd8deadSopenharmony_ci 1565bd8deadSopenharmony_ci Vertex data are placed into arrays that are stored in the server's address 1575bd8deadSopenharmony_ci space (described in section 2.9). Blocks of data in these arrays may then 1585bd8deadSopenharmony_ci be used to specify multiple geometric primitives through the execution of 1595bd8deadSopenharmony_ci a single GL command. The client may specify up to the value of 1605bd8deadSopenharmony_ci MAX_VERTEX_ATTRIBS arrays to store one or more generic vertex attributes. 1615bd8deadSopenharmony_ci A generic vertex attribute array is described by an index into an array of 1625bd8deadSopenharmony_ci vertex buffer bindings which contain the vertex data and state describing 1635bd8deadSopenharmony_ci how that data is organized. 1645bd8deadSopenharmony_ci 1655bd8deadSopenharmony_ci The commands 1665bd8deadSopenharmony_ci 1675bd8deadSopenharmony_ci [Compatibility profile only: Keep the named attribute *Pointer 1685bd8deadSopenharmony_ci commands in this list] 1695bd8deadSopenharmony_ci 1705bd8deadSopenharmony_ci void VertexAttribFormat(uint attribindex, int size, enum type, 1715bd8deadSopenharmony_ci boolean normalized, uint relativeoffset); 1725bd8deadSopenharmony_ci void VertexAttribIFormat(uint attribindex, int size, enum type, 1735bd8deadSopenharmony_ci uint relativeoffset); 1745bd8deadSopenharmony_ci 1755bd8deadSopenharmony_ci describe the organizations of vertex arrays. For each command, <type> 1765bd8deadSopenharmony_ci specifies the data type of the values stored in the array. <size> 1775bd8deadSopenharmony_ci indicates the number of values per vertex that are stored in the array as 1785bd8deadSopenharmony_ci well as their component ordering. Table 2.5 indicates the allowable values 1795bd8deadSopenharmony_ci for <size> and <type> (when present). For <type> the values BYTE, SHORT, 1805bd8deadSopenharmony_ci INT, FIXED, FLOAT, HALF_FLOAT, and DOUBLE indicate types byte, short, int, 1815bd8deadSopenharmony_ci fixed, float, half, and double, respectively; the values UNSIGNED_BYTE, 1825bd8deadSopenharmony_ci UNSIGNED_SHORT, and UNSIGNED_INT indicate types ubyte, ushort, and uint, 1835bd8deadSopenharmony_ci respectively; and the values INT_2_10_10_10_REV and UNSIGNED_INT_2_- 1845bd8deadSopenharmony_ci 10_10_10_REV, indicating respectively four signed or unsigned elements 1855bd8deadSopenharmony_ci packed into a single uint, both correspond to the term <packed> in that 1865bd8deadSopenharmony_ci table. <relativeoffset> is a byte offset of the first element relative 1875bd8deadSopenharmony_ci to the start of the vertex buffer binding this attribute fetches from. 1885bd8deadSopenharmony_ci 1895bd8deadSopenharmony_ci An INVALID_VALUE error is generated if <size> is not one of the values 1905bd8deadSopenharmony_ci allowed in table 2.5 for the corresponding command. 1915bd8deadSopenharmony_ci 1925bd8deadSopenharmony_ci An INVALID_OPERATION error is generated under any of the following 1935bd8deadSopenharmony_ci conditions: 1945bd8deadSopenharmony_ci - if no vertex array object is currently bound (see section 2.10); 1955bd8deadSopenharmony_ci - <size> is BGRA and <type> is not UNSIGNED_BYTE, INT_2_10_10_10_REV or 1965bd8deadSopenharmony_ci UNSIGNED_INT_2_10_10_10_REV; 1975bd8deadSopenharmony_ci - <type> is INT_2_10_10_10_REV or UNSIGNED_INT_2_10_10_10_REV, and <size> 1985bd8deadSopenharmony_ci is neither 4 or BGRA; 1995bd8deadSopenharmony_ci - <size> is BGRA and <normalized> is FALSE; 2005bd8deadSopenharmony_ci 2015bd8deadSopenharmony_ci An INVALID_VALUE error is generated if <relativeoffset> is larger than 2025bd8deadSopenharmony_ci the value of MAX_VERTEX_ATTRIB_RELATIVE_OFFSET. 2035bd8deadSopenharmony_ci 2045bd8deadSopenharmony_ci The <attribIndex> parameter in the VertexAttribFormat and VertexAttribIFormat 2055bd8deadSopenharmony_ci commands identifies the generic vertex attribute array being described. 2065bd8deadSopenharmony_ci The error INVALID_VALUE is generated if index is greater than or equal to 2075bd8deadSopenharmony_ci the value of MAX_VERTEX_ATTRIBS. Generic attribute arrays with integer 2085bd8deadSopenharmony_ci type arguments can be handled in one of three ways: converted to float by 2095bd8deadSopenharmony_ci normalizing to [0, 1] or [-1, 1] as described in equations 2.1 and 2.2, 2105bd8deadSopenharmony_ci respectively; converted directly to float, or left as integers. Data for 2115bd8deadSopenharmony_ci an array specified by VertexAttribPointer will be converted to floating- 2125bd8deadSopenharmony_ci point by normalizing if <normalized> is TRUE, and converted directly to 2135bd8deadSopenharmony_ci floating-point otherwise. Data for an array specified by 2145bd8deadSopenharmony_ci VertexAttribIFormat will always be left as integer values; such data are 2155bd8deadSopenharmony_ci referred to as pure integers. 2165bd8deadSopenharmony_ci 2175bd8deadSopenharmony_ci The command 2185bd8deadSopenharmony_ci 2195bd8deadSopenharmony_ci void BindVertexBuffer(uint bindingindex, uint buffer, intptr offset, 2205bd8deadSopenharmony_ci sizei stride); 2215bd8deadSopenharmony_ci 2225bd8deadSopenharmony_ci binds a buffer indicated by <buffer> to the vertex buffer bind point 2235bd8deadSopenharmony_ci indicated by <bindingindex>, and sets the <stride> between elements 2245bd8deadSopenharmony_ci and <offset> (in basic machine units) of the first element in the buffer. 2255bd8deadSopenharmony_ci The error INVALID_VALUE is generated if <stride> or <offset> are negative. 2265bd8deadSopenharmony_ci Otherwise pointers to the ith and (i + 1)st elements of an array differ 2275bd8deadSopenharmony_ci by stride basic machine units (typically unsigned bytes), the pointer to 2285bd8deadSopenharmony_ci the (i + 1)st element being greater. An INVALID_OPERATION error is 2295bd8deadSopenharmony_ci generated if no vertex array object is bound. If <buffer> is zero, any 2305bd8deadSopenharmony_ci buffer object attached to this bindpoint is detached. An INVALID_VALUE 2315bd8deadSopenharmony_ci error is generated if <bindingindex> is greater than the value of 2325bd8deadSopenharmony_ci MAX_VERTEX_ATTRIB_BINDINGS. 2335bd8deadSopenharmony_ci [Core profile only:] 2345bd8deadSopenharmony_ci An INVALID_OPERATION error is generated if buffer is not zero or a 2355bd8deadSopenharmony_ci name returned from a previous call to GenBuffers, or if such a name 2365bd8deadSopenharmony_ci has since been deleted with DeleteBuffers. 2375bd8deadSopenharmony_ci 2385bd8deadSopenharmony_ci The association between a vertex attribute and the vertex buffer binding 2395bd8deadSopenharmony_ci used by that attribute is set by the command 2405bd8deadSopenharmony_ci 2415bd8deadSopenharmony_ci void VertexAttribBinding(uint attribindex, uint bindingindex); 2425bd8deadSopenharmony_ci 2435bd8deadSopenharmony_ci <attribindex> must be less than the value of MAX_VERTEX_ATTRIBS and 2445bd8deadSopenharmony_ci <bindingindex> must be less than the value of MAX_VERTEX_ATTRIB_BINDINGS, 2455bd8deadSopenharmony_ci otherwise the error INVALID_VALUE is generated. An INVALID_OPERATION error 2465bd8deadSopenharmony_ci is generated if no vertex array object is bound. 2475bd8deadSopenharmony_ci 2485bd8deadSopenharmony_ci Modify Table 2.5 to add the command VertexAttribFormat to the first row 2495bd8deadSopenharmony_ci and VertexAttribIFormat to the second row. 2505bd8deadSopenharmony_ci 2515bd8deadSopenharmony_ci The one, two, three, or four values in an array that correspond to a 2525bd8deadSopenharmony_ci single vertex comprise an array element. When size is BGRA, it indicates 2535bd8deadSopenharmony_ci four values. The values within each array element are stored sequentially 2545bd8deadSopenharmony_ci in memory. However, if size is BGRA, the first, second, third, and fourth 2555bd8deadSopenharmony_ci values of each array element are taken from the third, second, first, and 2565bd8deadSopenharmony_ci fourth values in memory respectively. 2575bd8deadSopenharmony_ci [Compatibility profile only:] 2585bd8deadSopenharmony_ci For each *Pointer command, <pointer> specifies the location in 2595bd8deadSopenharmony_ci memory of the first value of the first element of the array being 2605bd8deadSopenharmony_ci specified. 2615bd8deadSopenharmony_ci 2625bd8deadSopenharmony_ci The command 2635bd8deadSopenharmony_ci 2645bd8deadSopenharmony_ci void VertexAttribLFormat(uint attribindex, int size, enum type, 2655bd8deadSopenharmony_ci uint relativeoffset); 2665bd8deadSopenharmony_ci 2675bd8deadSopenharmony_ci specifies state for a generic vertex attribute array associated with a 2685bd8deadSopenharmony_ci shader attribute variable declared with 64-bit double precision components. 2695bd8deadSopenharmony_ci <type> must be DOUBLE. <attribindex> and <size> behave as defined in all 2705bd8deadSopenharmony_ci other VertexAttrib*Format commands; <size> may be one, two, three or four. 2715bd8deadSopenharmony_ci 2725bd8deadSopenharmony_ci Each component of an array specified by VertexAttribLFormat will be 2735bd8deadSopenharmony_ci encoded into one or more generic attribute components as specified for the 2745bd8deadSopenharmony_ci VertexAttribL* commands in section 2.7. The error INVALID_VALUE is 2755bd8deadSopenharmony_ci generated if <attribindex> is greater than or equal to the value of 2765bd8deadSopenharmony_ci MAX_VERTEX_ATTRIBS. 2775bd8deadSopenharmony_ci 2785bd8deadSopenharmony_ci The commands 2795bd8deadSopenharmony_ci 2805bd8deadSopenharmony_ci void VertexAttribPointer(uint index, int size, enum type, 2815bd8deadSopenharmony_ci boolean normalized, sizei stride, 2825bd8deadSopenharmony_ci const void *pointer); 2835bd8deadSopenharmony_ci void VertexAttribIPointer(uint index, int size, enum type, 2845bd8deadSopenharmony_ci sizei stride, const void *pointer); 2855bd8deadSopenharmony_ci void VertexAttribLPointer(uint index, int size, enum type, 2865bd8deadSopenharmony_ci sizei stride, const void *pointer); 2875bd8deadSopenharmony_ci 2885bd8deadSopenharmony_ci control vertex attribute state, a vertex buffer binding, and the mapping 2895bd8deadSopenharmony_ci between a vertex attribute and a vertex buffer binding. They are 2905bd8deadSopenharmony_ci equivalent to (assuming no errors are generated): 2915bd8deadSopenharmony_ci 2925bd8deadSopenharmony_ci if (no buffer is bound to ARRAY_BUFFER and pointer != NULL) { 2935bd8deadSopenharmony_ci generate INVALID_OPERATION; 2945bd8deadSopenharmony_ci } 2955bd8deadSopenharmony_ci VertexAttrib*Format(index, size, type, {normalized, }, 0); 2965bd8deadSopenharmony_ci VertexAttribBinding(index, index); 2975bd8deadSopenharmony_ci if (stride != 0) { 2985bd8deadSopenharmony_ci effectiveStride = stride; 2995bd8deadSopenharmony_ci } else { 3005bd8deadSopenharmony_ci compute effectiveStride based on size/type; 3015bd8deadSopenharmony_ci } 3025bd8deadSopenharmony_ci VERTEX_ATTRIB_ARRAY_STRIDE[index] = stride; 3035bd8deadSopenharmony_ci // VERTEX_BINDING_STRIDE will be set to effectiveStride 3045bd8deadSopenharmony_ci // by BindVertexBuffer. 3055bd8deadSopenharmony_ci BindVertexBuffer(index, <buffer bound to ARRAY_BUFFER>, 3065bd8deadSopenharmony_ci (char *)pointer - (char *)NULL, effectiveStride); 3075bd8deadSopenharmony_ci 3085bd8deadSopenharmony_ci If <stride> is specified as zero, then array elements are stored 3095bd8deadSopenharmony_ci sequentially. 3105bd8deadSopenharmony_ci 3115bd8deadSopenharmony_ci An individual generic vertex attribute array is 3125bd8deadSopenharmony_ci enabled or disabled by calling one of 3135bd8deadSopenharmony_ci 3145bd8deadSopenharmony_ci void EnableVertexAttribArray(uint index); 3155bd8deadSopenharmony_ci void DisableVertexAttribArray(uint index); 3165bd8deadSopenharmony_ci 3175bd8deadSopenharmony_ci where <index> identifies the generic vertex attribute array to enable or 3185bd8deadSopenharmony_ci disable. An INVALID_VALUE error is generated if <index> is greater than or 3195bd8deadSopenharmony_ci equal to MAX_VERTEX_ATTRIBS. 3205bd8deadSopenharmony_ci 3215bd8deadSopenharmony_ci An INVALID_OPERATION error is generated if no vertex array object is 3225bd8deadSopenharmony_ci bound. 3235bd8deadSopenharmony_ci 3245bd8deadSopenharmony_ci The command 3255bd8deadSopenharmony_ci 3265bd8deadSopenharmony_ci void VertexBindingDivisor(uint bindingindex, uint divisor); 3275bd8deadSopenharmony_ci 3285bd8deadSopenharmony_ci modifies the rate at which generic vertex attributes advance when 3295bd8deadSopenharmony_ci rendering multiple instances of primitives in a single draw call. If 3305bd8deadSopenharmony_ci <divisor> is zero, the attributes using the buffer bound to <bindingindex> 3315bd8deadSopenharmony_ci advance once per vertex. If <divisor> is non-zero, the attributes advance 3325bd8deadSopenharmony_ci once per <divisor> instances of the set(s) of vertices being rendered. An 3335bd8deadSopenharmony_ci attribute is referred to as <instanced> if the corresponding <divisor> 3345bd8deadSopenharmony_ci value is non-zero. 3355bd8deadSopenharmony_ci 3365bd8deadSopenharmony_ci An INVALID_VALUE error is generated if <bindingindex> is greater than or 3375bd8deadSopenharmony_ci equal to the value of MAX_VERTEX_ATTRIB_BINDINGS. 3385bd8deadSopenharmony_ci 3395bd8deadSopenharmony_ci An INVALID_OPERATION error is generated if no vertex array object is 3405bd8deadSopenharmony_ci bound. 3415bd8deadSopenharmony_ci 3425bd8deadSopenharmony_ci The command 3435bd8deadSopenharmony_ci 3445bd8deadSopenharmony_ci void VertexAttribDivisor(uint index, uint divisor); 3455bd8deadSopenharmony_ci 3465bd8deadSopenharmony_ci is equivalent to (assuming no errors are generated): 3475bd8deadSopenharmony_ci 3485bd8deadSopenharmony_ci VertexAttribBinding(index, index); 3495bd8deadSopenharmony_ci VertexBindingDivisor(index, divisor); 3505bd8deadSopenharmony_ci 3515bd8deadSopenharmony_ci An INVALID_VALUE error is generated if <attribindex> is greater than or 3525bd8deadSopenharmony_ci equal to the value of MAX_VERTEX_ATTRIBS. 3535bd8deadSopenharmony_ci 3545bd8deadSopenharmony_ci 3555bd8deadSopenharmony_ci Modify Section 2.8.3, "Drawing Commands" 3565bd8deadSopenharmony_ci 3575bd8deadSopenharmony_ci For any vertex attribute whose divisor is non-zero as set by 3585bd8deadSopenharmony_ci VertexBindingDivisor, the value "baseinstance" is used to determine the 3595bd8deadSopenharmony_ci element of the enabled instanced attribute arrays that will be transferred 3605bd8deadSopenharmony_ci for all vertices transferred by this function. 3615bd8deadSopenharmony_ci 3625bd8deadSopenharmony_ci ... 3635bd8deadSopenharmony_ci 3645bd8deadSopenharmony_ci Those attributes that have divisor N where N is other than zero (as 3655bd8deadSopenharmony_ci specified by VertexBindingDivisor) advance once every N instances. 3665bd8deadSopenharmony_ci 3675bd8deadSopenharmony_ci ... 3685bd8deadSopenharmony_ci 3695bd8deadSopenharmony_ci If an enabled vertex attribute array is instanced (it has a non-zero 3705bd8deadSopenharmony_ci binding divisor as specified by VertexAttribBinding and 3715bd8deadSopenharmony_ci VertexBindingDivisor), the element that is transferred to the GL is given 3725bd8deadSopenharmony_ci by: 3735bd8deadSopenharmony_ci 3745bd8deadSopenharmony_ci floor(instance/divisor) + baseinstance 3755bd8deadSopenharmony_ci 3765bd8deadSopenharmony_ci ... 3775bd8deadSopenharmony_ci 3785bd8deadSopenharmony_ci If the number of supported generic vertex attributes (the value of MAX_- 3795bd8deadSopenharmony_ci VERTEX_ATTRIBS) is <n> and the number of vertex attribute bindings (the 3805bd8deadSopenharmony_ci value of MAX_VERTEX_ATTRIB_BINDINGS) is <k>, then the state required to 3815bd8deadSopenharmony_ci implement vertex arrays consists of <n> boolean values (enables), <n> 3825bd8deadSopenharmony_ci memory pointers, <n> integer stride values (VERTEX_ATTRIB_ARRAY_STRIDE), 3835bd8deadSopenharmony_ci <n> symbolic constants representing array types, <n> integers representing 3845bd8deadSopenharmony_ci values per element, <n> boolean values indicating normalization, <n> 3855bd8deadSopenharmony_ci boolean values indicating whether the attribute values are pure integers, 3865bd8deadSopenharmony_ci <k> integers representing vertex attribute divisors, <n> integer vertex 3875bd8deadSopenharmony_ci attribute binding indices, <n> integer relative offsets, <k> integer stride 3885bd8deadSopenharmony_ci values (VERTEX_BINDING_STRIDE), <k> 64-bit integer buffer offsets, and an 3895bd8deadSopenharmony_ci unsigned integer representing the restart index. 3905bd8deadSopenharmony_ci 3915bd8deadSopenharmony_ci In the initial state, the boolean values are each false, the memory 3925bd8deadSopenharmony_ci pointers are each NULL, the VERTEX_ATTRIB_ARRAY_STRIDE strides are each 3935bd8deadSopenharmony_ci zero, the array types are each FLOAT, the integers representing values per 3945bd8deadSopenharmony_ci element are each four, the normalized and pure integer flags are each 3955bd8deadSopenharmony_ci false, the divisors are each zero, the vertex attribute binding indices 3965bd8deadSopenharmony_ci are <i> for attribute <i>, the relative offsets are each zero, the 3975bd8deadSopenharmony_ci VERTEX_BINDING_STRIDE values are each 16, the buffer offsets are each zero, 3985bd8deadSopenharmony_ci and the restart index is zero. 3995bd8deadSopenharmony_ci 4005bd8deadSopenharmony_ci 4015bd8deadSopenharmony_ci Modify Section 2.9.6, "Vertex Arrays in Buffer Objects" 4025bd8deadSopenharmony_ci 4035bd8deadSopenharmony_ci When an array is sourced from a buffer object, the vertex attribute's 4045bd8deadSopenharmony_ci VERTEX_ATTRIB_BINDING indicates which vertex buffer binding is used. The 4055bd8deadSopenharmony_ci sum of the attribute's VERTEX_ATTRIB_RELATIVE_OFFSET and the vertex 4065bd8deadSopenharmony_ci buffer binding's VERTEX_BINDING_OFFSET is used as the offset (in basic 4075bd8deadSopenharmony_ci machine units) of the first element in that buffer's data store. 4085bd8deadSopenharmony_ci 4095bd8deadSopenharmony_ci (Compatibility Only) Add to the final paragraph: 4105bd8deadSopenharmony_ci 4115bd8deadSopenharmony_ci Attributes using client memory ignore the VERTEX_ATTRIB_BINDING state. 4125bd8deadSopenharmony_ci That is, the logic for computing the address of the base of a vertex array 4135bd8deadSopenharmony_ci is: 4145bd8deadSopenharmony_ci 4155bd8deadSopenharmony_ci bindingIndex = VERTEX_ATTRIB_BINDING[attribIndex]; 4165bd8deadSopenharmony_ci buffer = VERTEX_BINDING_BUFFER[bindingIndex]; 4175bd8deadSopenharmony_ci 4185bd8deadSopenharmony_ci if (buffer->name != 0) { 4195bd8deadSopenharmony_ci address = buffer->baseAddress + 4205bd8deadSopenharmony_ci VERTEX_BINDING_OFFSET[bindingIndex] + 4215bd8deadSopenharmony_ci VERTEX_ATTRIB_RELATIVE_OFFSET[attribIndex]; 4225bd8deadSopenharmony_ci } else { 4235bd8deadSopenharmony_ci address = VERTEX_ATTRIB_ARRAY_POINTER[attribIndex]; 4245bd8deadSopenharmony_ci } 4255bd8deadSopenharmony_ci 4265bd8deadSopenharmony_ci 4275bd8deadSopenharmony_ciAdditions to Chapter 3 of the OpenGL 2.0 Specification (Rasterization) 4285bd8deadSopenharmony_ci 4295bd8deadSopenharmony_ci None. 4305bd8deadSopenharmony_ci 4315bd8deadSopenharmony_ciAdditions to Chapter 4 of the OpenGL 2.0 Specification (Per-Fragment 4325bd8deadSopenharmony_ciOperations and the Frame Buffer) 4335bd8deadSopenharmony_ci 4345bd8deadSopenharmony_ci None. 4355bd8deadSopenharmony_ci 4365bd8deadSopenharmony_ciAdditions to Chapter 5 of the OpenGL 2.0 Specification (Special Functions) 4375bd8deadSopenharmony_ci 4385bd8deadSopenharmony_ci None. 4395bd8deadSopenharmony_ci 4405bd8deadSopenharmony_ciAdditions to Chapter 6 of the OpenGL 2.0 Specification (State and 4415bd8deadSopenharmony_ciState Requests) 4425bd8deadSopenharmony_ci 4435bd8deadSopenharmony_ci Modify Section 6.1.18, "Shader and Program Queries", p. 500 4445bd8deadSopenharmony_ci 4455bd8deadSopenharmony_ci (Append to the description of GetVertexAttrib) 4465bd8deadSopenharmony_ci 4475bd8deadSopenharmony_ci Queries of VERTEX_ATTRIB_ARRAY_BUFFER_BINDING and VERTEX_ATTRIB_ARRAY_- 4485bd8deadSopenharmony_ci DIVISOR first map the requested attribute index to a binding index via 4495bd8deadSopenharmony_ci the VERTEX_ATTRIB_BINDING state, and then return the value of 4505bd8deadSopenharmony_ci VERTEX_BINDING_BUFFER or VERTEX_BINDING_DIVISOR, respectively. 4515bd8deadSopenharmony_ci 4525bd8deadSopenharmony_ciAdditions to the AGL/GLX/WGL Specifications 4535bd8deadSopenharmony_ci 4545bd8deadSopenharmony_ci None. 4555bd8deadSopenharmony_ci 4565bd8deadSopenharmony_ciGLX Protocol 4575bd8deadSopenharmony_ci 4585bd8deadSopenharmony_ci TBD 4595bd8deadSopenharmony_ci 4605bd8deadSopenharmony_ciDependencies on NV_vertex_buffer_unified_memory 4615bd8deadSopenharmony_ci 4625bd8deadSopenharmony_ci When this extension is present, the GL_VERTEX_ATTRIB_ARRAY_ADDRESS_NV 4635bd8deadSopenharmony_ci state is modified to correspond to the <i>'th vertex buffer binding 4645bd8deadSopenharmony_ci rather than vertex attribute. Additionally, while the <buffer> and 4655bd8deadSopenharmony_ci <offset> set by BindVertexBuffer are irrelevant while 4665bd8deadSopenharmony_ci GL_VERTEX_ATTRIB_ARRAY_UNIFIED_NV is enabled, the command 4675bd8deadSopenharmony_ci 4685bd8deadSopenharmony_ci BindVertexBuffer(bindingindex, 0, 0, stride); 4695bd8deadSopenharmony_ci 4705bd8deadSopenharmony_ci can still be used to set the stride for a particular binding. 4715bd8deadSopenharmony_ci 4725bd8deadSopenharmony_ci Note that NV_vertex_buffer_unified_memory uses the same function names 4735bd8deadSopenharmony_ci (VertexAttrib*FormatNV) as this extension, however the behavior of the 4745bd8deadSopenharmony_ci these functions is different. 4755bd8deadSopenharmony_ci 4765bd8deadSopenharmony_ciDependencies on EXT_direct_state_access 4775bd8deadSopenharmony_ci 4785bd8deadSopenharmony_ci When this extension is not present, ignore references to 4795bd8deadSopenharmony_ci 4805bd8deadSopenharmony_ci VertexArrayBindVertexBufferEXT 4815bd8deadSopenharmony_ci VertexArrayVertexAttribFormatEXT 4825bd8deadSopenharmony_ci VertexArrayVertexAttribIFormatEXT 4835bd8deadSopenharmony_ci VertexArrayVertexAttribLFormatEXT 4845bd8deadSopenharmony_ci VertexArrayVertexAttribBindingEXT 4855bd8deadSopenharmony_ci VertexArrayVertexBindingDivisorEXT 4865bd8deadSopenharmony_ci 4875bd8deadSopenharmony_ci When EXT_direct_state_access is present, add new entry points that take a 4885bd8deadSopenharmony_ci vertex array object handle: 4895bd8deadSopenharmony_ci 4905bd8deadSopenharmony_ci void VertexArrayBindVertexBufferEXT(uint vaobj, uint bindingindex, uint buffer, intptr offset, 4915bd8deadSopenharmony_ci sizei stride); 4925bd8deadSopenharmony_ci 4935bd8deadSopenharmony_ci void VertexArrayVertexAttribFormatEXT(uint vaobj, uint attribindex, int size, enum type, 4945bd8deadSopenharmony_ci boolean normalized, uint relativeoffset); 4955bd8deadSopenharmony_ci void VertexArrayVertexAttribIFormatEXT(uint vaobj, uint attribindex, int size, enum type, 4965bd8deadSopenharmony_ci uint relativeoffset); 4975bd8deadSopenharmony_ci void VertexArrayVertexAttribLFormatEXT(uint vaobj, uint attribindex, int size, enum type, 4985bd8deadSopenharmony_ci uint relativeoffset); 4995bd8deadSopenharmony_ci 5005bd8deadSopenharmony_ci void VertexArrayVertexAttribBindingEXT(uint vaobj, uint attribindex, uint bindingindex); 5015bd8deadSopenharmony_ci 5025bd8deadSopenharmony_ci void VertexArrayVertexBindingDivisorEXT(uint vaobj, uint bindingindex, uint divisor); 5035bd8deadSopenharmony_ci 5045bd8deadSopenharmony_ci These commands behave identically to their 5055bd8deadSopenharmony_ci non-VertexArray/EXT-suffixed commands except they modify the state 5065bd8deadSopenharmony_ci of the vertex array object named by their initial vaobj parameter 5075bd8deadSopenharmony_ci (rather than the currently bound vertex array object). The vertex 5085bd8deadSopenharmony_ci array object named by vaobj must be generated by GenVertexArrays 5095bd8deadSopenharmony_ci (and not since deleted); otherwise an INVALID_OPERATION error is 5105bd8deadSopenharmony_ci generated. 5115bd8deadSopenharmony_ci 5125bd8deadSopenharmony_ci Modify the description of GetVertexArrayIntegeri_vEXT to allow 5135bd8deadSopenharmony_ci queries of VERTEX_BINDING_OFFSET and VERTEX_BINDING_STRIDE state: 5145bd8deadSopenharmony_ci 5155bd8deadSopenharmony_ci "For GetVertexArrayIntegeri_vEXT, <pname> must be one of the 5165bd8deadSopenharmony_ci 'Get value' tokens in tables 6.8 and 6.9 that use GetVertexAttribiv 5175bd8deadSopenharmony_ci or GetVertexAttribPointerv (so allowing only the VERTEX_ATTRIB_* and 5185bd8deadSopenharmony_ci VERTEX_BINDING_* tokens) or a token of the form TEXTURE_COORD_ARRAY_*; 5195bd8deadSopenharmony_ci <index> identifies the vertex attribute array to query, vertex binding to 5205bd8deadSopenharmony_ci query, or texture coordinate set index." 5215bd8deadSopenharmony_ci 5225bd8deadSopenharmony_ciDependencies on the Compatibility profile 5235bd8deadSopenharmony_ci 5245bd8deadSopenharmony_ci If the context is created with a compatibility profile, remove the 5255bd8deadSopenharmony_ci INVALID_OPERATION errors from all new commands if no vertex array 5265bd8deadSopenharmony_ci object is currently bound, and remove the INVALID_OPERATION error 5275bd8deadSopenharmony_ci from VertexAttrib*Pointer if no buffer is bound to ARRAY_BUFFER and 5285bd8deadSopenharmony_ci pointer != NULL. 5295bd8deadSopenharmony_ci 5305bd8deadSopenharmony_ci Client vertex arrays are not changed to use the new state, that is, 5315bd8deadSopenharmony_ci VERTEX_ATTRIB_ARRAY_POINTER is still attribute state. 5325bd8deadSopenharmony_ci 5335bd8deadSopenharmony_ciErrors 5345bd8deadSopenharmony_ci 5355bd8deadSopenharmony_ci !!!TODO 5365bd8deadSopenharmony_ci 5375bd8deadSopenharmony_ciNew State 5385bd8deadSopenharmony_ci 5395bd8deadSopenharmony_ci (Modify Table 6.5 -- Vertex Array Object State) 5405bd8deadSopenharmony_ci 5415bd8deadSopenharmony_ci Initial 5425bd8deadSopenharmony_ci Get Value Type Get Command Value Description Sec. 5435bd8deadSopenharmony_ci --------- ------- ----------- ------- ------------------------ ------ 5445bd8deadSopenharmony_ci VERTEX_ATTRIB_BINDING 16*Z16* GetVertexAttribiv <i>[fn1] Vertex buffer binding 2.8 5455bd8deadSopenharmony_ci used by vertex attrib <i> 5465bd8deadSopenharmony_ci VERTEX_ATTRIB_RELATIVE_ 16*Z+ GetVertexAttribiv 0 Byte offset added to 2.8 5475bd8deadSopenharmony_ci OFFSET vertex binding offset 5485bd8deadSopenharmony_ci for this attribute 5495bd8deadSopenharmony_ci VERTEX_BINDING_OFFSET 16*Z GetInteger64i_v 0 Byte offset of the first 2.8 5505bd8deadSopenharmony_ci element in data store of 5515bd8deadSopenharmony_ci the buffer bound to vertex 5525bd8deadSopenharmony_ci binding <i> 5535bd8deadSopenharmony_ci VERTEX_BINDING_STRIDE 16*Z GetIntegeri_v 16 Stride between elements in 2.8 5545bd8deadSopenharmony_ci vertex binding <i> 5555bd8deadSopenharmony_ci VERTEX_BINDING_DIVISOR 16*Z+ GetIntegeri_v 0 Instance divisor used for 2.8 5565bd8deadSopenharmony_ci vertex binding <i> 5575bd8deadSopenharmony_ci VERTEX_BINDING_BUFFER 16*Z+ GetIntegeri_v 0 Name of buffer bound to 2.8 5585bd8deadSopenharmony_ci vertex binding <i> 5595bd8deadSopenharmony_ci 5605bd8deadSopenharmony_ci [fn1] The <i>'th attribute defaults to a value of <i>. 5615bd8deadSopenharmony_ci 5625bd8deadSopenharmony_ci If the compatibility profile is supported, then all of these new state 5635bd8deadSopenharmony_ci values belong to the 'vertex-array' attribute. 5645bd8deadSopenharmony_ci 5655bd8deadSopenharmony_ciNew Implementation Dependent State 5665bd8deadSopenharmony_ci 5675bd8deadSopenharmony_ci Minimum 5685bd8deadSopenharmony_ci Get Value Type Get Command Value Description Sec. 5695bd8deadSopenharmony_ci --------- ------- ----------- ------- -------------------- ------ 5705bd8deadSopenharmony_ci MAX_VERTEX_ATTRIB_ Z GetIntegerv 2047 Maximum offset added 2.8 5715bd8deadSopenharmony_ci RELATIVE_OFFSET to vertex buffer 5725bd8deadSopenharmony_ci binding offset 5735bd8deadSopenharmony_ci MAX_VERTEX_ATTRIB_BINDINGS Z16* GetIntegerv 16 Maxmimum number of 2.8 5745bd8deadSopenharmony_ci vertex buffers 5755bd8deadSopenharmony_ci 5765bd8deadSopenharmony_ciNVIDIA Implementation Details 5775bd8deadSopenharmony_ci 5785bd8deadSopenharmony_ci The VertexArrayVertexBindingDivisorEXT function was not missing 5795bd8deadSopenharmony_ci from early versions of this specification's interactions with 5805bd8deadSopenharmony_ci EXT_direct_state_access (an oversight). NVIDIA driver implementations 5815bd8deadSopenharmony_ci (prior to Release 330.00, August 2013) do not advertise the function a 5825bd8deadSopenharmony_ci GetProcAddress call for the function name will return NULL. 5835bd8deadSopenharmony_ci 5845bd8deadSopenharmony_ciExamples 5855bd8deadSopenharmony_ci 5865bd8deadSopenharmony_ci The following code will set up two interleaved vertex buffers, where 5875bd8deadSopenharmony_ci attribs 0 and 1 are vec3 position and vec3 color in buffer0, and attribs 5885bd8deadSopenharmony_ci 2 and 3 come from are vec2 texcoords in buffer1. 5895bd8deadSopenharmony_ci 5905bd8deadSopenharmony_ci // Set up formats and relative offsets within the interleaved data. 5915bd8deadSopenharmony_ci VertexAttribFormat(0, 3, FLOAT, FALSE, 0); 5925bd8deadSopenharmony_ci VertexAttribFormat(1, 3, FLOAT, FALSE, 12); 5935bd8deadSopenharmony_ci VertexAttribFormat(2, 2, FLOAT, FALSE, 0); 5945bd8deadSopenharmony_ci VertexAttribFormat(3, 2, FLOAT, FALSE, 8); 5955bd8deadSopenharmony_ci 5965bd8deadSopenharmony_ci // Set up attrib->binding mapping 5975bd8deadSopenharmony_ci VertexAttribBinding(0, 0); 5985bd8deadSopenharmony_ci VertexAttribBinding(1, 0); 5995bd8deadSopenharmony_ci VertexAttribBinding(2, 1); 6005bd8deadSopenharmony_ci VertexAttribBinding(3, 1); 6015bd8deadSopenharmony_ci 6025bd8deadSopenharmony_ci // Bind the vertex buffers to binding index 0 and 1. 6035bd8deadSopenharmony_ci BindVertexBuffer(0, buffer0, 0, 24); 6045bd8deadSopenharmony_ci BindVertexBuffer(1, buffer1, 0, 16); 6055bd8deadSopenharmony_ci 6065bd8deadSopenharmony_ciIssues 6075bd8deadSopenharmony_ci 6085bd8deadSopenharmony_ci (1) Should the instance divisor (previously VertexAttribDivisor) be 6095bd8deadSopenharmony_ci attribute state or binding state? 6105bd8deadSopenharmony_ci 6115bd8deadSopenharmony_ci RESOLVED: Make it per-binding, since some hardware requires this. 6125bd8deadSopenharmony_ci 6135bd8deadSopenharmony_ci (2) How is a stride of zero interpreted in BindVertexBuffer? 6145bd8deadSopenharmony_ci 6155bd8deadSopenharmony_ci RESOLVED: No error is generated, all array elements for a given 6165bd8deadSopenharmony_ci attribute will be sourced from the same location in the buffer. 6175bd8deadSopenharmony_ci 6185bd8deadSopenharmony_ci (3) How is a stride of zero handled in VertexAttribPointer? 6195bd8deadSopenharmony_ci 6205bd8deadSopenharmony_ci RESOLVED: BindVertexBuffer has no knowledge of the attrib format, 6215bd8deadSopenharmony_ci so VertexAttribPointer needs to compute the stride itself. However, 6225bd8deadSopenharmony_ci if an application specifies a stride of zero and then queries 6235bd8deadSopenharmony_ci VERTEX_ATTRIB_ARRAY_STRIDE, it returns zero. So the derived stride 6245bd8deadSopenharmony_ci that's passed to BindVertexBuffer must be tracked separately from the 6255bd8deadSopenharmony_ci stride originally passed to VertexAttribPointer, so this spec introduces 6265bd8deadSopenharmony_ci a separate piece of state (VERTEX_BINDING_STRIDE). Rendering always uses 6275bd8deadSopenharmony_ci VERTEX_BINDING_STRIDE. 6285bd8deadSopenharmony_ci 6295bd8deadSopenharmony_ci This can potentially lead to misleading state queries if the API is 6305bd8deadSopenharmony_ci abused. For example: 6315bd8deadSopenharmony_ci 6325bd8deadSopenharmony_ci VertexAttribPointer(0, 3, FLOAT, FALSE, 12, 0); 6335bd8deadSopenharmony_ci // VERTEX_ATTRIB_ARRAY_STRIDE = 12 6345bd8deadSopenharmony_ci // VERTEX_BINDING_STRIDE = 12 6355bd8deadSopenharmony_ci BindVertexBuffer(0, buffer, 0, 16) 6365bd8deadSopenharmony_ci // now VERTEX_ATTRIB_ARRAY_STRIDE is still 12, but 6375bd8deadSopenharmony_ci // VERTEX_BINDING_STRIDE = 16. 6385bd8deadSopenharmony_ci 6395bd8deadSopenharmony_ci (4) How should the attrib->binding mapping be handled for legacy commands? 6405bd8deadSopenharmony_ci 6415bd8deadSopenharmony_ci RESOLVED: Redefine legacy commands to reset the mapping to its initial 6425bd8deadSopenharmony_ci state for the attribute being operated on. This allows legacy code to 6435bd8deadSopenharmony_ci coexist in the same context/VAO with use of this extension even though 6445bd8deadSopenharmony_ci that code is oblivious to the fact that this mapping is now flexible. 6455bd8deadSopenharmony_ci As long as the legacy code sets up each attribute it wants to use, it 6465bd8deadSopenharmony_ci should operate as expected. This may be useful for applications using 6475bd8deadSopenharmony_ci middleware that they can't control. 6485bd8deadSopenharmony_ci 6495bd8deadSopenharmony_ci (5) What is the minimum maximum value for VERTEX_ATTRIB_RELATIVE_OFFSET? 6505bd8deadSopenharmony_ci 6515bd8deadSopenharmony_ci RESOLVED: Agreed on 2047 (inclusive). 6525bd8deadSopenharmony_ci 6535bd8deadSopenharmony_ci (6) Can MAX_VERTEX_ATTRIBS and MAX_VERTEX_ATTRIB_BINDINGS have different 6545bd8deadSopenharmony_ci values? 6555bd8deadSopenharmony_ci 6565bd8deadSopenharmony_ci RESOLVED: Decided that it's nice to have them be separate queries, but 6575bd8deadSopenharmony_ci that we don't want to deal with all the complexities that arise if the 6585bd8deadSopenharmony_ci two values are different. So this spec assumes that the two values are 6595bd8deadSopenharmony_ci the same. 6605bd8deadSopenharmony_ci 6615bd8deadSopenharmony_ci (7) How does this extension interact with EXT_direct_state_access? 6625bd8deadSopenharmony_ci 6635bd8deadSopenharmony_ci RESOLVED: The EXT commands in this specification are available only when 6645bd8deadSopenharmony_ci EXT_direct_state_access is also advertised. 6655bd8deadSopenharmony_ci 6665bd8deadSopenharmony_ci Note: Early versions of this specification failed to document 6675bd8deadSopenharmony_ci the EXT_direct_state_access commands. Revision 3 (August 2013) 6685bd8deadSopenharmony_ci corrects this oversight. 6695bd8deadSopenharmony_ci 6705bd8deadSopenharmony_ci (8) Which state queries return information from attributes vs from 6715bd8deadSopenharmony_ci bindings? 6725bd8deadSopenharmony_ci 6735bd8deadSopenharmony_ci RESOLVED: The general convention is that tokens starting with 6745bd8deadSopenharmony_ci VERTEX_BINDING return information corresponding to a buffer binding and 6755bd8deadSopenharmony_ci are queried with GetIntegeri_v, whereas tokens starting with 6765bd8deadSopenharmony_ci VERTEX_ATTRIB_ARRAY return information corresponding to a vertex 6775bd8deadSopenharmony_ci attribute index and are queried with GetVertexAttribiv. 6785bd8deadSopenharmony_ci 6795bd8deadSopenharmony_ci For cases where there is both an "attribute" and "binding" token for the 6805bd8deadSopenharmony_ci same state, the "attribute" query returns state for the binding that 6815bd8deadSopenharmony_ci attribute is currently using (set via VertexAttribBinding). Specifically, 6825bd8deadSopenharmony_ci VERTEX_ATTRIB_ARRAY_BUFFER_BINDING returns a value from VERTEX_BINDING_- 6835bd8deadSopenharmony_ci BUFFER, and VERTEX_ATTRIB_ARRAY_DIVISOR returns a value from VERTEX_- 6845bd8deadSopenharmony_ci BINDING_DIVISOR. 6855bd8deadSopenharmony_ci 6865bd8deadSopenharmony_ci A notable exception to this is for VERTEX_BINDING_STRIDE and 6875bd8deadSopenharmony_ci VERTEX_ATTRIB_ARRAY_STRIDE. As described in issue (3), these tokens track 6885bd8deadSopenharmony_ci separate state. 6895bd8deadSopenharmony_ci 6905bd8deadSopenharmony_ci 6915bd8deadSopenharmony_ciRevision History 6925bd8deadSopenharmony_ci 6935bd8deadSopenharmony_ci Rev. Date Author Changes 6945bd8deadSopenharmony_ci ---- -------- -------- ------------------------------------------ 6955bd8deadSopenharmony_ci 5 10/22/13 jbolz Added missing definition of 6965bd8deadSopenharmony_ci VERTEX_BINDING_DIVISOR, and added 6975bd8deadSopenharmony_ci VERTEX_BINDING_BUFFER, to keep things consistent. 6985bd8deadSopenharmony_ci 4 08/06/13 mjk Added EXT_direct_state_access interactions 6995bd8deadSopenharmony_ci 3 07/19/13 Jon Leech Add error to BindVertexBuffer for the core 7005bd8deadSopenharmony_ci profile if <buffer> is not a name returned 7015bd8deadSopenharmony_ci by GenBuffers (Bug 10486). 7025bd8deadSopenharmony_ci 2 08/13/12 Jon Leech Renumbered from #143 to #125 7035bd8deadSopenharmony_ci 1 jbolz Internal revisions. 704