15bd8deadSopenharmony_ciName 25bd8deadSopenharmony_ci 35bd8deadSopenharmony_ci APPLE_vertex_array_range 45bd8deadSopenharmony_ci 55bd8deadSopenharmony_ciName Strings 65bd8deadSopenharmony_ci 75bd8deadSopenharmony_ci GL_APPLE_vertex_array_range 85bd8deadSopenharmony_ci 95bd8deadSopenharmony_ciContact 105bd8deadSopenharmony_ci 115bd8deadSopenharmony_ci Geoff Stahl, Apple Computer (gstahl 'at' apple.com) 125bd8deadSopenharmony_ci 135bd8deadSopenharmony_ciStatus 145bd8deadSopenharmony_ci 155bd8deadSopenharmony_ci Complete 165bd8deadSopenharmony_ci 175bd8deadSopenharmony_ciVersion 185bd8deadSopenharmony_ci 195bd8deadSopenharmony_ci $Date: 2009/01/07 22:05:21 $ $Revision: 1.13 $ 205bd8deadSopenharmony_ci 215bd8deadSopenharmony_ciNumber 225bd8deadSopenharmony_ci 235bd8deadSopenharmony_ci 274 245bd8deadSopenharmony_ci 255bd8deadSopenharmony_ciDependencies 265bd8deadSopenharmony_ci 275bd8deadSopenharmony_ci APPLE_fence can affect this extension. 285bd8deadSopenharmony_ci 295bd8deadSopenharmony_ciOverview 305bd8deadSopenharmony_ci 315bd8deadSopenharmony_ci This extension is designed to allow very high vertex processing rates which 325bd8deadSopenharmony_ci are facilitated both by relieving the CPU of as much processing burden as 335bd8deadSopenharmony_ci possible and by allowing graphics hardware to directly access vertex data. 345bd8deadSopenharmony_ci Because this extension is implemented as an addition to the vertex array 355bd8deadSopenharmony_ci specification provided by OpenGL 1.1, applications can continue to use 365bd8deadSopenharmony_ci existing vertex submission logic while taking advantage of vertex array 375bd8deadSopenharmony_ci ranges to more efficiently process those arrays. 385bd8deadSopenharmony_ci 395bd8deadSopenharmony_ci The vertex array coherency model provided by OpenGL 1.1 requires that 405bd8deadSopenharmony_ci vertex data specified in vertex arrays be transferred from system memory 415bd8deadSopenharmony_ci each time Begin, DrawArrays, or DrawElements is called. Further, OpenGL 425bd8deadSopenharmony_ci 1.1 requires that the transfer of data be completed by the time End, 435bd8deadSopenharmony_ci DrawArrays, or DrawElements returns. Both of these requirements are 445bd8deadSopenharmony_ci relaxed by the vertex array range extension. Vertex data may be cached 455bd8deadSopenharmony_ci by the GL so there is no guarantee that changes to the vertex data will 465bd8deadSopenharmony_ci be reflected in following drawing commands unless it is flushed with 475bd8deadSopenharmony_ci FlushVertexArrayRangeAPPLE. The reading of vertex data may be deferred 485bd8deadSopenharmony_ci by the GL so there is no guarantee that the GL will be finished reading 495bd8deadSopenharmony_ci the data until completion is forced by the use of Finish or the APPLE_fence 505bd8deadSopenharmony_ci extension. 515bd8deadSopenharmony_ci 525bd8deadSopenharmony_ci Vertex array range can be enabled in two ways. EnableClientState can be 535bd8deadSopenharmony_ci used with the VERTEX_ARRAY_RANGE_APPLE param to enable vertex array range 545bd8deadSopenharmony_ci for the client context. One can also simply set the vertex array storage 555bd8deadSopenharmony_ci hint to either STORAGE_CACHED_APPLE or STORAGE_SHARED_APPLE (as discussed 565bd8deadSopenharmony_ci below) to enable a particular vertex array range. Once this is done, use of 575bd8deadSopenharmony_ci vertex array range requires the definition of a specific memory range for 585bd8deadSopenharmony_ci vertex data through VertexArrayRangeAPPLE. It is recommended this data be 595bd8deadSopenharmony_ci page aligned (4096 byte boundaries) and a multiple of page size in length 605bd8deadSopenharmony_ci for maximum efficiency in data handling and internal flushing, but this is 615bd8deadSopenharmony_ci not a requirement and any location and length of data can be defined as a 625bd8deadSopenharmony_ci vertex array. This extension provides no memory allocators as any 635bd8deadSopenharmony_ci convenient memory allocator can be used. 645bd8deadSopenharmony_ci 655bd8deadSopenharmony_ci Once a data set is established, using VertexArrayRangeAPPLE, it can be can 665bd8deadSopenharmony_ci be drawn using standard OpenGL vertex array commands, as one would do 675bd8deadSopenharmony_ci without this extension. Note, if any the data for any enabled array for a 685bd8deadSopenharmony_ci given array element index falls outside of the vertex array range, an 695bd8deadSopenharmony_ci undefined vertex is generated. One should also understand removing or 705bd8deadSopenharmony_ci replacing all calls to vertex array range functions with no-ops or disabling 715bd8deadSopenharmony_ci the vertex array range by disabling the VERTEX_ARRAY_RANGE_APPLE client 725bd8deadSopenharmony_ci state should not change the results of an application's OpenGL drawing. 735bd8deadSopenharmony_ci 745bd8deadSopenharmony_ci For static data no additional coherency nor synchronization must be done and 755bd8deadSopenharmony_ci the client is free to draw with the specified draw as it sees fit. 765bd8deadSopenharmony_ci 775bd8deadSopenharmony_ci If data is dynamic, thus to be modified, FlushVertexArrayRangeAPPLE should 785bd8deadSopenharmony_ci be used. The command is issued when data has been modified since the last 795bd8deadSopenharmony_ci call to VertexArrayRangeAPPLE or FlushVertexArrayRangeAPPLE and prior to 805bd8deadSopenharmony_ci drawing with such data. FlushVertexArrayRangeAPPLE only provides memory 815bd8deadSopenharmony_ci coherency prior to drawing (such as ensuring CPU caches are flushed or VRAM 825bd8deadSopenharmony_ci cached copies are updated) and does not provide any synchronization with 835bd8deadSopenharmony_ci previously issued drawing commands. The range flushed can be the specific 845bd8deadSopenharmony_ci range modified and does not have to be the entire vertex array range. 855bd8deadSopenharmony_ci Additionally, data maybe read immediately after a flush without need for 865bd8deadSopenharmony_ci further synchronization, thus overlapping areas of data maybe read, modified 875bd8deadSopenharmony_ci and written between two successive flushes and the data will be 885bd8deadSopenharmony_ci consistent. 895bd8deadSopenharmony_ci 905bd8deadSopenharmony_ci To synchronize data modification after drawing two methods can be used. A 915bd8deadSopenharmony_ci Finish command can be issued which will not return until all previously 925bd8deadSopenharmony_ci issued commands are complete, forcing completely synchronous operation. 935bd8deadSopenharmony_ci While this guarantees all drawing is complete it may not be the optimal 945bd8deadSopenharmony_ci solution for clients which just need to ensure drawing with the vertex array 955bd8deadSopenharmony_ci range or a specific range with the array is compete. The APPLE_fence 965bd8deadSopenharmony_ci extension can be used when dynamic data modifications need to be 975bd8deadSopenharmony_ci synchronized with drawing commands. Specifically, if data is to be modified, 985bd8deadSopenharmony_ci a fence can be set immediately after drawing with the data. Once it comes 995bd8deadSopenharmony_ci time to modify the data, the application must test (or finish) this fence to 1005bd8deadSopenharmony_ci ensure the drawing command has completed. Failure to do this could result in 1015bd8deadSopenharmony_ci new data being used by the previously issued drawing commands. It should be 1025bd8deadSopenharmony_ci noted that providing the maximum time between the drawing set fence and the 1035bd8deadSopenharmony_ci modification test/finish fence allows the most asynchronous behavior and 1045bd8deadSopenharmony_ci will result in the least stalling waiting for drawing completion. Techniques 1055bd8deadSopenharmony_ci such as double buffering vertex data can be used to help further prevent 1065bd8deadSopenharmony_ci stalls based on fence completion but are beyond the scope of this extension. 1075bd8deadSopenharmony_ci 1085bd8deadSopenharmony_ci Once an application is finished with a specific vertex array range or at 1095bd8deadSopenharmony_ci latest prior to exit, and prior to freeing the memory associated with this 1105bd8deadSopenharmony_ci vertex array, the client should call VertexArrayRangeAPPLE with a data 1115bd8deadSopenharmony_ci location and length of 0 to allow the internal memory managers to complete 1125bd8deadSopenharmony_ci any commitments for the array range. In this case once 1135bd8deadSopenharmony_ci VertexArrayRangeAPPLE returns it is safe to de-allocate the memory. 1145bd8deadSopenharmony_ci 1155bd8deadSopenharmony_ci Three types of storage hints are available for vertex array ranges; client, 1165bd8deadSopenharmony_ci shared, and cached. These hints are set by passing the 1175bd8deadSopenharmony_ci STORAGE_CLIENT_APPLE, STORAGE_SHARED_APPLE, or STORAGE_CACHED_APPLE param to 1185bd8deadSopenharmony_ci VertexArrayParameteriAPPLE with VERTEX_ARRAY_STORAGE_HINT_APPLE pname. 1195bd8deadSopenharmony_ci Client storage, the default OpenGL behavior, occurs when 1205bd8deadSopenharmony_ci VERTEX_ARRAY_RANGE_APPLE is disabled AND the STORAGE_CLIENT_APPLE hint is 1215bd8deadSopenharmony_ci set. Note, STORAGE_CLIENT_APPLE is also the default hint setting. Shared 1225bd8deadSopenharmony_ci memory usage is normally used for dynamic data that is expected to be 1235bd8deadSopenharmony_ci modified and is likely mapped to AGP memory space for access by both the 1245bd8deadSopenharmony_ci graphics hardware and client. It is set when either 1255bd8deadSopenharmony_ci VERTEX_ARRAY_RANGE_APPLE is enabled, without the STORAGE_CACHED_APPLE hint 1265bd8deadSopenharmony_ci being set, or in all cases when the STORAGE_SHARED_APPLE hint is set. 1275bd8deadSopenharmony_ci Finally, the cached storage is designed to support static data and data which 1285bd8deadSopenharmony_ci could be cached in VRAM. This provides maximum access bandwidth for the 1295bd8deadSopenharmony_ci vertex array and occurs when the STORAGE_CACHED_APPLE hint is set. 1305bd8deadSopenharmony_ci 1315bd8deadSopenharmony_ci The following pseudo-code represents the treatment of a vertex array range 1325bd8deadSopenharmony_ci memory depending on the hint setting and whether vertex array range is 1335bd8deadSopenharmony_ci enabled for the client context: 1345bd8deadSopenharmony_ci 1355bd8deadSopenharmony_ci if (VERTEX_ARRAY_STORAGE_HINT_APPLE == STORAGE_CACHED_APPLE) 1365bd8deadSopenharmony_ci vertex array is treated as cached 1375bd8deadSopenharmony_ci else if (VERTEX_ARRAY_STORAGE_HINT_APPLE == STORAGE_SHARED_APPLE) 1385bd8deadSopenharmony_ci vertex array is treated as shared 1395bd8deadSopenharmony_ci else if (VERTEX_ARRAY_RANGE_APPLE enabled) 1405bd8deadSopenharmony_ci vertex array is treated as shared 1415bd8deadSopenharmony_ci else 1425bd8deadSopenharmony_ci vertex array is treated as client 1435bd8deadSopenharmony_ci 1445bd8deadSopenharmony_ci Note, these hints can affect how array flushes are handled and the overhead 1455bd8deadSopenharmony_ci associated with flushing the array, it is recommended that data be handled 1465bd8deadSopenharmony_ci as shared unless it really is static and there are no plans to modify it. 1475bd8deadSopenharmony_ci 1485bd8deadSopenharmony_ci To summarize the vertex array range extension provides relaxed 1495bd8deadSopenharmony_ci synchronization rules for handling vertex array data allowing high bandwidth 1505bd8deadSopenharmony_ci asynchronous data transfer from client memory to graphics hardware. 1515bd8deadSopenharmony_ci Different flushing and synchronization rules are required to ensure data 1525bd8deadSopenharmony_ci coherency when modifying data. Lastly, memory handling hints are provided 1535bd8deadSopenharmony_ci to allow the tunning of memory storage and access for maximum efficiency. 1545bd8deadSopenharmony_ci 1555bd8deadSopenharmony_ciIssues 1565bd8deadSopenharmony_ci 1575bd8deadSopenharmony_ci How does one get the current VERTEX_ARRAY_STORAGE_HINT_APPLE (storage hint) 1585bd8deadSopenharmony_ci for a vertex array range? 1595bd8deadSopenharmony_ci 1605bd8deadSopenharmony_ci RESOLUTION: The current VERTEX_ARRAY_STORAGE_HINT_APPLE can be retrieved 1615bd8deadSopenharmony_ci via GetIntegerv with VERTEX_ARRAY_STORAGE_HINT_APPLE as the pname. 1625bd8deadSopenharmony_ci 1635bd8deadSopenharmony_ci How does this extension interact with the compiled_vertex_array extension? 1645bd8deadSopenharmony_ci 1655bd8deadSopenharmony_ci RESOLUTION: They are independent and not interfere with each other. In 1665bd8deadSopenharmony_ci practice, if you use APPLE_vertex_array_range, you can surpass the 1675bd8deadSopenharmony_ci performance of compiled_vertex_array 1685bd8deadSopenharmony_ci 1695bd8deadSopenharmony_ci Should we give a programmer a sense of how big a vertex array range they can 1705bd8deadSopenharmony_ci specify? 1715bd8deadSopenharmony_ci 1725bd8deadSopenharmony_ci RESOLUTION: Not completely resolved. There should be a query for 1735bd8deadSopenharmony_ci determining the maximum safe size of a vertex array range which, we do 1745bd8deadSopenharmony_ci not have as of yet. Currently, the vertex array range size plus the 1755bd8deadSopenharmony_ci command buffers must not exceed available GART space, which in real world 1765bd8deadSopenharmony_ci terms, means the smallest maximum vertex array range size is about 24 MB 1775bd8deadSopenharmony_ci on any currently supported hardware on Mac OS X and get's larger normally 1785bd8deadSopenharmony_ci with more RAM and/or more advanced graphics hardware. Failure modes are 1795bd8deadSopenharmony_ci likely either failure to speed up the vertex processing or failure to 1805bd8deadSopenharmony_ci draw all the vertex data. So clients should plan on single vertex array 1815bd8deadSopenharmony_ci ranges of less than 24 MB if they intend to run on all Mac OS X hardware. 1825bd8deadSopenharmony_ci 1835bd8deadSopenharmony_ci Should Flush be the same as FlushVertexArrayRangeAPPLE? 1845bd8deadSopenharmony_ci 1855bd8deadSopenharmony_ci RESOLUTION: No. A Flush is a different concept than 1865bd8deadSopenharmony_ci FlushVertexArrayRangeAPPLE. a Flush submits pending OpenGL commands to the 1875bd8deadSopenharmony_ci OpenGL engine for processing while, a FlushVertexArrayRangeAPPLE just ensures 1885bd8deadSopenharmony_ci memory coherency for the vertex array range and does not perform a Flush 1895bd8deadSopenharmony_ci in OpenGL terms. 1905bd8deadSopenharmony_ci 1915bd8deadSopenharmony_ciNew Procedures and Functions 1925bd8deadSopenharmony_ci 1935bd8deadSopenharmony_ci void VertexArrayRangeAPPLE(sizei length, void *pointer); 1945bd8deadSopenharmony_ci void FlushVertexArrayRangeAPPLE(sizei length, void *pointer); 1955bd8deadSopenharmony_ci void VertexArrayParameteriAPPLE(enum pname, int param); 1965bd8deadSopenharmony_ci 1975bd8deadSopenharmony_ciNew Tokens 1985bd8deadSopenharmony_ci 1995bd8deadSopenharmony_ci Accepted by the <cap> parameter of EnableClientState, DisableClientState, 2005bd8deadSopenharmony_ci and IsEnabled: 2015bd8deadSopenharmony_ci 2025bd8deadSopenharmony_ci VERTEX_ARRAY_RANGE_APPLE 0x851D 2035bd8deadSopenharmony_ci 2045bd8deadSopenharmony_ci Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, 2055bd8deadSopenharmony_ci and GetDoublev: 2065bd8deadSopenharmony_ci 2075bd8deadSopenharmony_ci VERTEX_ARRAY_RANGE_LENGTH_APPLE 0x851E 2085bd8deadSopenharmony_ci MAX_VERTEX_ARRAY_RANGE_ELEMENT_APPLE 0x8520 2095bd8deadSopenharmony_ci 2105bd8deadSopenharmony_ci Accepted by the <pname> parameter of GetPointerv: 2115bd8deadSopenharmony_ci 2125bd8deadSopenharmony_ci VERTEX_ARRAY_RANGE_POINTER_APPLE 0x8521 2135bd8deadSopenharmony_ci 2145bd8deadSopenharmony_ci Accepted by the <pname> parameter of VertexArrayParameteriAPPLE, 2155bd8deadSopenharmony_ci GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev: 2165bd8deadSopenharmony_ci 2175bd8deadSopenharmony_ci VERTEX_ARRAY_STORAGE_HINT_APPLE 0x851F 2185bd8deadSopenharmony_ci 2195bd8deadSopenharmony_ci Accepted by the <param> parameter of VertexArrayParameteriAPPLE: 2205bd8deadSopenharmony_ci 2215bd8deadSopenharmony_ci STORAGE_CLIENT_APPLE 0x85B4 2225bd8deadSopenharmony_ci STORAGE_CACHED_APPLE 0x85BE 2235bd8deadSopenharmony_ci STORAGE_SHARED_APPLE 0x85BF 2245bd8deadSopenharmony_ci 2255bd8deadSopenharmony_ciAdditions to Chapter 2 of the OpenGL 1.1 Specification (OpenGL Operation) 2265bd8deadSopenharmony_ci 2275bd8deadSopenharmony_ci After the discussion of vertex arrays (Section 2.8) add a 2285bd8deadSopenharmony_ci description of the vertex array range: 2295bd8deadSopenharmony_ci 2305bd8deadSopenharmony_ci "The command 2315bd8deadSopenharmony_ci 2325bd8deadSopenharmony_ci void VertexArrayRangeAPPLE(sizei length, void *pointer) 2335bd8deadSopenharmony_ci 2345bd8deadSopenharmony_ci specifies the current vertex array range. When the vertex array range is 2355bd8deadSopenharmony_ci specified and valid, vertex transfers from within the vertex array 2365bd8deadSopenharmony_ci range are potentially faster. The vertex array range is a contiguous 2375bd8deadSopenharmony_ci region of address space for placing vertex arrays. The "pointer" parameter 2385bd8deadSopenharmony_ci is a pointer to the base of the vertex array range. The "length" pointer is 2395bd8deadSopenharmony_ci the length of the vertex array range in basic machine units (typically 2405bd8deadSopenharmony_ci unsigned bytes). Memory associated with a vertex array range should be 2415bd8deadSopenharmony_ci allocated by the client and the responsibility for maintaining it rests with 2425bd8deadSopenharmony_ci the client as long as it is being used as a vertex array range. 2435bd8deadSopenharmony_ci 2445bd8deadSopenharmony_ci The vertex array range address space region extends from "pointer" to 2455bd8deadSopenharmony_ci "pointer + length - 1" inclusive. When specified, vertex array vertex 2465bd8deadSopenharmony_ci transfers from within the vertex array range are potentially faster. 2475bd8deadSopenharmony_ci 2485bd8deadSopenharmony_ci There is some system burden associated with establishing a vertex array 2495bd8deadSopenharmony_ci range (typically, the memory range must be locked down). If either the 2505bd8deadSopenharmony_ci vertex array range pointer or size is set to zero, the previously 2515bd8deadSopenharmony_ci established vertex array range is released (typically, unlocking the 2525bd8deadSopenharmony_ci memory). This should always be done prior to freeing of the memory by the 2535bd8deadSopenharmony_ci client. 2545bd8deadSopenharmony_ci 2555bd8deadSopenharmony_ci The vertex array range may not be established for operating system dependent 2565bd8deadSopenharmony_ci reasons, and therefore, not valid. Reasons that a vertex array range cannot 2575bd8deadSopenharmony_ci be established include exceeding the maximum vertex array range size, the 2585bd8deadSopenharmony_ci memory could not be locked down, etc. 2595bd8deadSopenharmony_ci 2605bd8deadSopenharmony_ci The vertex array range is considered enabled after VERTEX_ARRAY_RANGE_APPLE 2615bd8deadSopenharmony_ci client state is enabled and as soon as a valid vertex array range is 2625bd8deadSopenharmony_ci specified and disabled once the size length and/or pointer is set to zero or 2635bd8deadSopenharmony_ci VERTEX_ARRAY_RANGE_APPLE client state is disabled. 2645bd8deadSopenharmony_ci 2655bd8deadSopenharmony_ci When the vertex array range is enabled, ArrayElement commands may generate 2665bd8deadSopenharmony_ci undefined vertices if and only if any indexed elements of the enabled arrays 2675bd8deadSopenharmony_ci are not within the vertex array range or if the index is negative or greater 2685bd8deadSopenharmony_ci or equal to the implementation-dependent value of 2695bd8deadSopenharmony_ci MAX_VERTEX_ARRAY_RANGE_ELEMENT_APPLE. If an undefined vertex is generated, 2705bd8deadSopenharmony_ci an INVALID_OPERATION error may or may not be generated. 2715bd8deadSopenharmony_ci 2725bd8deadSopenharmony_ci The vertex array coherency model specifies when vertex data must be extracted 2735bd8deadSopenharmony_ci from the vertex array memory. When the vertex array range is not valid, 2745bd8deadSopenharmony_ci (quoting the specification) `Changes made to array data between the 2755bd8deadSopenharmony_ci execution of Begin and the corresponding execution of End may effect calls 2765bd8deadSopenharmony_ci to ArrayElement that are made within the same Begin/End period in 2775bd8deadSopenharmony_ci non-sequential ways. That is, a call to ArrayElement that precedes a change 2785bd8deadSopenharmony_ci to array data may access the changed data, and a call that follows a change 2795bd8deadSopenharmony_ci to array data may access the original data.' 2805bd8deadSopenharmony_ci 2815bd8deadSopenharmony_ci When the vertex array range is valid, the vertex array coherency model is 2825bd8deadSopenharmony_ci relaxed so that changes made to array data may affect calls to ArrayElement 2835bd8deadSopenharmony_ci in non-sequential ways. That is a call to ArrayElement that precedes a 2845bd8deadSopenharmony_ci change to array data may access the changed data, and a call that follows a 2855bd8deadSopenharmony_ci change to array data may access original data. This requires in two points 2865bd8deadSopenharmony_ci of synchronization to maintain coherency. 2875bd8deadSopenharmony_ci 2885bd8deadSopenharmony_ci The first point where synchronization must occur to maintain coherency is 2895bd8deadSopenharmony_ci post data modification, prior to drawing. FlushVertexArrayRangeAPPLE should 2905bd8deadSopenharmony_ci be used by the client on all ranges of memory which have been modified since 2915bd8deadSopenharmony_ci the last call to VertexArrayRangeAPPLE or FlushVertexArrayRangeAPPLE. 2925bd8deadSopenharmony_ci 2935bd8deadSopenharmony_ci The second point of synchronization is after drawing with a vertex array 2945bd8deadSopenharmony_ci range and prior to modifying it's data. In this case either Finish or a 2955bd8deadSopenharmony_ci fence must be used. Finish will create a synchronization point for all 2965bd8deadSopenharmony_ci drawing an may not be the optimal method to ensure drawing completion prior 2975bd8deadSopenharmony_ci to data modification. A fence, defined in the APPLE_fence extension, on the 2985bd8deadSopenharmony_ci other hand allows more selective synchronization. The client can set a fence 2995bd8deadSopenharmony_ci immediately after drawing with the data in question and test or finish that 3005bd8deadSopenharmony_ci fence prior to modifying the data. See the APPLE_fence extension for more 3015bd8deadSopenharmony_ci details. 3025bd8deadSopenharmony_ci 3035bd8deadSopenharmony_ci To maintain full coherency, once a vertex array range is enabled, requires 3045bd8deadSopenharmony_ci the client to both flush the vertex array after data modification, prior to 3055bd8deadSopenharmony_ci drawing, and synchronize with Finish or a fence after drawing, prior to 3065bd8deadSopenharmony_ci modifying the data. 3075bd8deadSopenharmony_ci 3085bd8deadSopenharmony_ci The command 3095bd8deadSopenharmony_ci 3105bd8deadSopenharmony_ci void VertexArrayParameteriAPPLE(enum pname, int param) 3115bd8deadSopenharmony_ci 3125bd8deadSopenharmony_ci allows the client to hint at the expected use of the vertex array range. 3135bd8deadSopenharmony_ci pname must be VERTEX_ARRAY_STORAGE_HINT_APPLE. param can either be 3145bd8deadSopenharmony_ci STORAGE_CACHED_APPLE or STORAGE_SHARED_APPLE and can be used by the system 3155bd8deadSopenharmony_ci to tune the handling of the vertex array range data. These 3165bd8deadSopenharmony_ci parameters are just hints and require no specific handling by the system. 3175bd8deadSopenharmony_ci The default state is STORAGE_SHARED_APPLE which, indicates that the vertex 3185bd8deadSopenharmony_ci data is expected to be dynamic and should be handled in a way to optimize 3195bd8deadSopenharmony_ci modification and flushing of the vertex array range, if possible. 3205bd8deadSopenharmony_ci STORAGE_CACHED_APPLE indicates the data is expected to static and techniques 3215bd8deadSopenharmony_ci such as VRAM caching could be employed to optimize memory bandwidth to the 3225bd8deadSopenharmony_ci vertex array range. Proper use of FlushVertexArrayRangeAPPLE guarantees 3235bd8deadSopenharmony_ci memory coherency in all cases and will result in deterministic defined 3245bd8deadSopenharmony_ci behavior in all cases, whether hints are employed or not. 3255bd8deadSopenharmony_ci 3265bd8deadSopenharmony_ci The client state required to implement the vertex array range consists of an 3275bd8deadSopenharmony_ci enable bit, a memory pointer, an integer size, and a valid bit." 3285bd8deadSopenharmony_ci 3295bd8deadSopenharmony_ciAdditions to Chapter 5 of the OpenGL 1.1 Specification (Special Functions) 3305bd8deadSopenharmony_ci 3315bd8deadSopenharmony_ci Add to the end of Section 5.4 "Display Lists" 3325bd8deadSopenharmony_ci 3335bd8deadSopenharmony_ci "VertexArrayRangeAPPLE and FlushVertexArrayRangeAPPLE are not complied into 3345bd8deadSopenharmony_ci display lists but are executed immediately. 3355bd8deadSopenharmony_ci 3365bd8deadSopenharmony_ci If a display list is compiled while VERTEX_ARRAY_RANGE_APPLE is enabled, the 3375bd8deadSopenharmony_ci commands ArrayElement, DrawArrays, DrawElements, and DrawRangeElements are 3385bd8deadSopenharmony_ci accumulated into a display list as if VERTEX_ARRAY_RANGE_APPLE is disabled." 3395bd8deadSopenharmony_ci 3405bd8deadSopenharmony_ciAdditions to the CGL interface: 3415bd8deadSopenharmony_ci 3425bd8deadSopenharmony_ci None 3435bd8deadSopenharmony_ci 3445bd8deadSopenharmony_ciAdditions to the WGL interface: 3455bd8deadSopenharmony_ci 3465bd8deadSopenharmony_ci None 3475bd8deadSopenharmony_ci 3485bd8deadSopenharmony_ciAdditions to the GLX Specification 3495bd8deadSopenharmony_ci 3505bd8deadSopenharmony_ci None 3515bd8deadSopenharmony_ci 3525bd8deadSopenharmony_ciGLX Protocol 3535bd8deadSopenharmony_ci 3545bd8deadSopenharmony_ci None 3555bd8deadSopenharmony_ci 3565bd8deadSopenharmony_ciErrors 3575bd8deadSopenharmony_ci 3585bd8deadSopenharmony_ci INVALID_OPERATION is generated if VertexArrayRangeAPPLE or 3595bd8deadSopenharmony_ci FlushVertexArrayRangeAPPLE is called between the execution of Begin and the 3605bd8deadSopenharmony_ci corresponding execution of End. 3615bd8deadSopenharmony_ci 3625bd8deadSopenharmony_ci INVALID_OPERATION may be generated if an undefined vertex is generated. 3635bd8deadSopenharmony_ci 3645bd8deadSopenharmony_ciNew State 3655bd8deadSopenharmony_ci 3665bd8deadSopenharmony_ci Initial 3675bd8deadSopenharmony_ci Get Value Get Command Type Value Attrib 3685bd8deadSopenharmony_ci --------- ----------- ---- ------- ------------ 3695bd8deadSopenharmony_ci VERTEX_ARRAY_RANGE_APPLE IsEnabled B False vertex-array 3705bd8deadSopenharmony_ci VERTEX_ARRAY_RANGE_POINTER_APPLE GetPointerv Z+ 0 vertex-array 3715bd8deadSopenharmony_ci VERTEX_ARRAY_RANGE_LENGTH_APPLE GetIntegerv Z+ 0 vertex-array 3725bd8deadSopenharmony_ci VERTEX_ARRAY_STORAGE_HINT_APPLE GetIntegerv Z3 STORAGE_CLIENT_APPLE vertex-array 3735bd8deadSopenharmony_ci 3745bd8deadSopenharmony_ciNew Implementation Dependent State 3755bd8deadSopenharmony_ci 3765bd8deadSopenharmony_ci Get Value Get Command Type Minimum Value 3775bd8deadSopenharmony_ci --------- ----------- ----- ------------- 3785bd8deadSopenharmony_ci MAX_VERTEX_ARRAY_RANGE_ELEMENT_APPLE GetIntegerv Z+ 65535 3795bd8deadSopenharmony_ci 3805bd8deadSopenharmony_ciRevision History 3815bd8deadSopenharmony_ci 3825bd8deadSopenharmony_ci None 383