WorldWindAndroid
WorldWindAndroid copied to clipboard
Increase the shape vertex count limit
Increase the limit on path and polygon vertex count currently imposed on applications. Currently, the following limitations apply to path and polygon shapes:
- Maximum of 65,535 vertices for path/polygon
- Maximum of 32,767 vertices for extruded path/polygon
These limits include the intermediate points added by path and polygon according to the maximumIntermediatePoints property. This limit is a function of the unsigned short data type used to store shape index buffers. Standard OpenGL ES 2 does not provide a larger index data type, but a widely available extension does: https://www.khronos.org/registry/gles/extensions/OES/OES_element_index_uint.txt
Modify shapes to use the GL extension OES_element_index_uint when it's available, thereby increasing the limit on vertex count as follows:
- Maximum of 4,294,967,295 vertices for path/polygon
- Maximum of 2,147,483,647 vertices for extruded path/polygon