15bd8deadSopenharmony_ci 25bd8deadSopenharmony_ciName 35bd8deadSopenharmony_ci 45bd8deadSopenharmony_ci ATI_element_array 55bd8deadSopenharmony_ci 65bd8deadSopenharmony_ci 75bd8deadSopenharmony_ciName Strings 85bd8deadSopenharmony_ci 95bd8deadSopenharmony_ci GL_ATI_element_array 105bd8deadSopenharmony_ci 115bd8deadSopenharmony_ci 125bd8deadSopenharmony_ciContact 135bd8deadSopenharmony_ci 145bd8deadSopenharmony_ci Rick Hammerstone, AMD (rick.hammerstone 'at' amd.com) 155bd8deadSopenharmony_ci 165bd8deadSopenharmony_ci 175bd8deadSopenharmony_ciVersion 185bd8deadSopenharmony_ci 195bd8deadSopenharmony_ci 0.3 - 11/04/06 205bd8deadSopenharmony_ci Updated contact info after ATI/AMD merger. 215bd8deadSopenharmony_ci 225bd8deadSopenharmony_ci 0.2 - 09/18/01 235bd8deadSopenharmony_ci Changed default behavior of draw commands when element array is 245bd8deadSopenharmony_ci not enabled. Now generates an error and draws nothing. 255bd8deadSopenharmony_ci 265bd8deadSopenharmony_ci 0.1 - 07/06/01 275bd8deadSopenharmony_ci Initial revision 285bd8deadSopenharmony_ci 295bd8deadSopenharmony_ci 305bd8deadSopenharmony_ciNumber 315bd8deadSopenharmony_ci 325bd8deadSopenharmony_ci 256 335bd8deadSopenharmony_ci 345bd8deadSopenharmony_ciDependencies 355bd8deadSopenharmony_ci 365bd8deadSopenharmony_ci This extension is written against the OpenGL 1.2.1 Specification. 375bd8deadSopenharmony_ci OpenGL 1.1 is required. ATI_vertex_array_object affects the 385bd8deadSopenharmony_ci definition of this extension. 395bd8deadSopenharmony_ci 405bd8deadSopenharmony_ci 415bd8deadSopenharmony_ciOverview 425bd8deadSopenharmony_ci 435bd8deadSopenharmony_ci This extension provides a mechanism for an application to create 445bd8deadSopenharmony_ci an array of index data for use in specifying geometric primitives. 455bd8deadSopenharmony_ci 465bd8deadSopenharmony_ci This extension is most useful when used in conjunction with the 475bd8deadSopenharmony_ci ATI_vertex_array_object extension. ATI_vertex_array_object 485bd8deadSopenharmony_ci provides an interface for storing vertex array data in persistent, 495bd8deadSopenharmony_ci hardware-addressable memory. In cases where large amounts of 505bd8deadSopenharmony_ci vertex data are in use, the index data used to construct 515bd8deadSopenharmony_ci primitives (typically as passed to the GL through DrawElements) 525bd8deadSopenharmony_ci can impose a significant bandwidth burden. ATI_element_array 535bd8deadSopenharmony_ci allows the application to specify independent arrays of elements, 545bd8deadSopenharmony_ci which can then be cached using ATI_vertex_array_object. 555bd8deadSopenharmony_ci 565bd8deadSopenharmony_ci 575bd8deadSopenharmony_ciIssues 585bd8deadSopenharmony_ci 595bd8deadSopenharmony_ci Should we allow ElementPointerATI to specify a stride? 605bd8deadSopenharmony_ci 615bd8deadSopenharmony_ci No, the expectation is that the indices are always packed 625bd8deadSopenharmony_ci together. 635bd8deadSopenharmony_ci 645bd8deadSopenharmony_ci Should we allow ElementPointerATI to accept more types than those 655bd8deadSopenharmony_ci accepted by DrawElements and DrawRangeElements? 665bd8deadSopenharmony_ci 675bd8deadSopenharmony_ci No, it doesn't seem useful to allow float indices, they have 685bd8deadSopenharmony_ci to get converted to some kind of int anyways. 695bd8deadSopenharmony_ci 705bd8deadSopenharmony_ci Should the element count be specified in the draw command, or as 715bd8deadSopenharmony_ci part of the definition of the element array. 725bd8deadSopenharmony_ci 735bd8deadSopenharmony_ci As part of the draw command. Specifying it as part of the 745bd8deadSopenharmony_ci definition of element array sort of makes sense, but it 755bd8deadSopenharmony_ci doesn't really fit with the way that vertex arrays currently 765bd8deadSopenharmony_ci work. 775bd8deadSopenharmony_ci 785bd8deadSopenharmony_ci Do we want to specify new entry points for the draw commands? 795bd8deadSopenharmony_ci 805bd8deadSopenharmony_ci Yes. The alternative is to overload DrawElements and 815bd8deadSopenharmony_ci DrawRangeElements by doing something funky like passing a null 825bd8deadSopenharmony_ci pointer. This seems like it would be too confusing. 835bd8deadSopenharmony_ci 845bd8deadSopenharmony_ci Is it useful to have the draw commands do something (other than 855bd8deadSopenharmony_ci return an error) when the element array is disabled? 865bd8deadSopenharmony_ci 875bd8deadSopenharmony_ci No. It's very hard to ascertain the intent of the application 885bd8deadSopenharmony_ci at this point, so it's probably best to not draw anything. 895bd8deadSopenharmony_ci 905bd8deadSopenharmony_ci 915bd8deadSopenharmony_ciNew Procedures and Functions 925bd8deadSopenharmony_ci 935bd8deadSopenharmony_ci void ElementPointerATI(enum type, const void *pointer) 945bd8deadSopenharmony_ci 955bd8deadSopenharmony_ci void DrawElementArrayATI(enum mode, sizei count) 965bd8deadSopenharmony_ci 975bd8deadSopenharmony_ci void DrawRangeElementArrayATI(enum mode, uint start, 985bd8deadSopenharmony_ci uint end, sizei count) 995bd8deadSopenharmony_ci 1005bd8deadSopenharmony_ci 1015bd8deadSopenharmony_ciNew Tokens 1025bd8deadSopenharmony_ci 1035bd8deadSopenharmony_ci Accepted by the <array> parameter of EnableClientState and 1045bd8deadSopenharmony_ci DisableClientState, the <value> parameter of IsEnabled, and if 1055bd8deadSopenharmony_ci ATI_vertex_array_object is defined, the <array> parameter of 1065bd8deadSopenharmony_ci ArrayObjectATI, GetArrayObjectivATI, GetArrayObjectfvATI: 1075bd8deadSopenharmony_ci 1085bd8deadSopenharmony_ci ELEMENT_ARRAY_ATI 0x8768 1095bd8deadSopenharmony_ci 1105bd8deadSopenharmony_ci Accepted by the <value> parameter of GetBooleanv, GetIntegerv, 1115bd8deadSopenharmony_ci GetFloatv, and GetDoublev: 1125bd8deadSopenharmony_ci 1135bd8deadSopenharmony_ci ELEMENT_ARRAY_TYPE_ATI 0x8769 1145bd8deadSopenharmony_ci 1155bd8deadSopenharmony_ci Accepted by the <pname> paramater of GetPointerv: 1165bd8deadSopenharmony_ci 1175bd8deadSopenharmony_ci ELEMENT_ARRAY_POINTER_ATI 0x876A 1185bd8deadSopenharmony_ci 1195bd8deadSopenharmony_ci 1205bd8deadSopenharmony_ciAdditions to Chapter 2 of the GL Specification (OpenGL Operation) 1215bd8deadSopenharmony_ci 1225bd8deadSopenharmony_ci In section 2.6.3, GL Commands within Begin/End, add 1235bd8deadSopenharmony_ci ElementArrayATI to the list of commands that are not allowed 1245bd8deadSopenharmony_ci within any Begin/End pair, but may or may not generate an error. 1255bd8deadSopenharmony_ci 1265bd8deadSopenharmony_ci 1275bd8deadSopenharmony_ci Inserted in section 2.8, Vertex Arrays, after the description of 1285bd8deadSopenharmony_ci DrawRangeElements, but before the description of 1295bd8deadSopenharmony_ci InterleavedArrays: 1305bd8deadSopenharmony_ci 1315bd8deadSopenharmony_ci The commands 1325bd8deadSopenharmony_ci 1335bd8deadSopenharmony_ci void DrawElementArrayATI(enum mode, sizei count) 1345bd8deadSopenharmony_ci 1355bd8deadSopenharmony_ci void DrawRangeElementArrayATI(enum mode, uint start, 1365bd8deadSopenharmony_ci uint end, sizei count) 1375bd8deadSopenharmony_ci 1385bd8deadSopenharmony_ci can be used to construct a sequence of geometric primitives in the 1395bd8deadSopenharmony_ci same manner as DrawElements and DrawRangeElements, but using 1405bd8deadSopenharmony_ci a previously defined array of indices. For DrawElementArrayATI, 1415bd8deadSopenharmony_ci the <mode> and <count> arguments match the corresponding arguments 1425bd8deadSopenharmony_ci to DrawElements. For DrawRangeElementArrayATI, the <mode>, 1435bd8deadSopenharmony_ci <start>, <end> and <count> arguments match the corresponding 1445bd8deadSopenharmony_ci arguments to DrawRangeElements. 1455bd8deadSopenharmony_ci 1465bd8deadSopenharmony_ci For both DrawElementArrayATI and DrawRangeElementArrayATI, the 1475bd8deadSopenharmony_ci list of indices used to generate primitives is defined by the 1485bd8deadSopenharmony_ci command 1495bd8deadSopenharmony_ci 1505bd8deadSopenharmony_ci void ElementPointer(enum type, const void *pointer) 1515bd8deadSopenharmony_ci 1525bd8deadSopenharmony_ci The <pointer> argument is used to specify the list of indices, and 1535bd8deadSopenharmony_ci the <type> argument specifies their format. These arguments match 1545bd8deadSopenharmony_ci the <type> and <indices> arguments to DrawElements and 1555bd8deadSopenharmony_ci DrawRangeElements, and the allowed types match those accepted by 1565bd8deadSopenharmony_ci these two commands -- GL_UNSIGNED_BYTE, GL_UNSIGNED_SHORT, and 1575bd8deadSopenharmony_ci GL_UNSIGNED_INT. ElementPointer does not specify a stride between 1585bd8deadSopenharmony_ci successive indices in the array, the values must be stored 1595bd8deadSopenharmony_ci sequentially in memory. 1605bd8deadSopenharmony_ci 1615bd8deadSopenharmony_ci The array of element indices can be enabled and disabled by 1625bd8deadSopenharmony_ci calling EnableClientState and DisableClientState with the argument 1635bd8deadSopenharmony_ci ELEMENT_ARRAY_ATI. DrawElements and DrawRangeElements ignore the 1645bd8deadSopenharmony_ci currently enabled element array. 1655bd8deadSopenharmony_ci 1665bd8deadSopenharmony_ci If a DrawElementArrayATI or DrawRangeElementArrayATI command is 1675bd8deadSopenharmony_ci issued when there is no currently enabled element array, an error 1685bd8deadSopenharmony_ci is generated, no drawing is done and the current state is not 1695bd8deadSopenharmony_ci updated. 1705bd8deadSopenharmony_ci 1715bd8deadSopenharmony_ci 1725bd8deadSopenharmony_ci 1735bd8deadSopenharmony_ciAdditions to Chapter 3 of the 1.2.1 Specification (Rasterization) 1745bd8deadSopenharmony_ci 1755bd8deadSopenharmony_ci None 1765bd8deadSopenharmony_ci 1775bd8deadSopenharmony_ci 1785bd8deadSopenharmony_ciAdditions to Chapter 4 of the 1.2.1 Specification (Per-Fragment 1795bd8deadSopenharmony_ciOperations and the Frame Buffer) 1805bd8deadSopenharmony_ci 1815bd8deadSopenharmony_ci None 1825bd8deadSopenharmony_ci 1835bd8deadSopenharmony_ci 1845bd8deadSopenharmony_ciAdditions to Chapter 5 of the 1.2.1 Specification (Special Functions) 1855bd8deadSopenharmony_ci 1865bd8deadSopenharmony_ci In section 5.4, Display Lists, change the last sentence of the first 1875bd8deadSopenharmony_ci paragraph to read: 1885bd8deadSopenharmony_ci 1895bd8deadSopenharmony_ci (Vertex array and element array pointers are dereferenced when the 1905bd8deadSopenharmony_ci commands ArrayElement, DrawArrays, DrawElements, 1915bd8deadSopenharmony_ci DrawRangeElements, DrawElementArrayATI, or 1925bd8deadSopenharmony_ci DrawRangeElementArrayATI are accumulated into a display list.) 1935bd8deadSopenharmony_ci 1945bd8deadSopenharmony_ci In section 5.4, Display Lists, add ElementArrayATI to the list of 1955bd8deadSopenharmony_ci commands that are not compiled into display lists but are executed 1965bd8deadSopenharmony_ci immediately. 1975bd8deadSopenharmony_ci 1985bd8deadSopenharmony_ci 1995bd8deadSopenharmony_ciAdditions to Chapter 6 of the 1.2.1 Specification (State and State 2005bd8deadSopenharmony_ciRequests) 2015bd8deadSopenharmony_ci 2025bd8deadSopenharmony_ci In section 6.1.11, Pointer and String Queries, add 2035bd8deadSopenharmony_ci ELEMENT_ARRAY_POINTER_ATI to the list of possible values for the 2045bd8deadSopenharmony_ci <pname> parameter of GetPointerv. 2055bd8deadSopenharmony_ci 2065bd8deadSopenharmony_ci 2075bd8deadSopenharmony_ciAdditions to the specification of ATI_vertex_array_object 2085bd8deadSopenharmony_ci 2095bd8deadSopenharmony_ci Added to the discussion of the <size>, <type>, and <stride> 2105bd8deadSopenharmony_ci parameters of ArrayObjectATI: 2115bd8deadSopenharmony_ci 2125bd8deadSopenharmony_ci If the <array> parameter of ArrayObjectATI is ELEMENT_ARRAY_ATI, 2135bd8deadSopenharmony_ci then <size> must be one, and <stride> must be zero. INVALID_VALUE 2145bd8deadSopenharmony_ci is generated if either of these parameters is invalid. The <type> 2155bd8deadSopenharmony_ci parameter must be UNSIGNED_BYTE, UNSIGNED_SHORT, or UNSIGNED_INT. 2165bd8deadSopenharmony_ci INVALID_ENUM is generated if <type> is not one of these values. 2175bd8deadSopenharmony_ci 2185bd8deadSopenharmony_ci 2195bd8deadSopenharmony_ciErrors 2205bd8deadSopenharmony_ci 2215bd8deadSopenharmony_ci Invalid <mode> or <count> parameters to DrawElementArrayATI 2225bd8deadSopenharmony_ci generate the same errors as would the corresponding call to 2235bd8deadSopenharmony_ci DrawElements. 2245bd8deadSopenharmony_ci 2255bd8deadSopenharmony_ci Invalid <mode>, <count>, <start>, or <end> parameters to 2265bd8deadSopenharmony_ci DrawRangeElementArrayATI generate the same errors as would the 2275bd8deadSopenharmony_ci corresponding call to DrawRangeElements. 2285bd8deadSopenharmony_ci 2295bd8deadSopenharmony_ci INVALID_ENUM is generated if the <type> parameter of 2305bd8deadSopenharmony_ci ElementArrayATI is not UNSIGNED_BYTE, UNSIGNED_SHORT, or 2315bd8deadSopenharmony_ci UNSIGNED_INT. 2325bd8deadSopenharmony_ci 2335bd8deadSopenharmony_ci INVALID_OPERATION is generated if a DrawElementArrayATI or 2345bd8deadSopenharmony_ci DrawRangeElementArrayATI command is issued when there is no 2355bd8deadSopenharmony_ci currently enabled element array. 2365bd8deadSopenharmony_ci 2375bd8deadSopenharmony_ci 2385bd8deadSopenharmony_ciNew State 2395bd8deadSopenharmony_ci 2405bd8deadSopenharmony_ci Added to table 6.6, Vertex Array Data 2415bd8deadSopenharmony_ci 2425bd8deadSopenharmony_ci Get Value Get Command Type Initial Value Attrib 2435bd8deadSopenharmony_ci --------- ----------- ---- ------------- ------ 2445bd8deadSopenharmony_ci ELEMENT_ARRAY_ATI IsEnabled B False client 2455bd8deadSopenharmony_ci ELEMENT_ARRAY_TYPE_ATI GetIntegerv Z4 UNSIGNED_INT client 2465bd8deadSopenharmony_ci ELEMENT_ARRAY_POINTER_ATI GetPointerv Z+ 0 client 2475bd8deadSopenharmony_ci 2485bd8deadSopenharmony_ci 2495bd8deadSopenharmony_ciImplementation Notes 2505bd8deadSopenharmony_ci 2515bd8deadSopenharmony_ci For maximum performance, applications should use 2525bd8deadSopenharmony_ci UNSIGNED_SHORT or UNSIGNED_INT indices. 253