1'''OpenGL extension APPLE.vertex_array_object 2 3This module customises the behaviour of the 4OpenGL.raw.GL.APPLE.vertex_array_object to provide a more 5Python-friendly API 6 7Overview (from the spec) 8 9 This extension introduces named vertex array objects which encapsulate 10 vertex array state on the client side. The main purpose of these 11 objects is to keep pointers to static vertex data and provide a name 12 for different sets of static vertex data. 13 14 By extending vertex array range functionality this extension allows multiple 15 vertex array ranges to exist at one time, including their complete sets of 16 state, in manner analogous to texture objects. 17 18 GenVertexArraysAPPLE creates a list of n number of vertex array object 19 names. After creating a name, BindVertexArrayAPPLE associates the name with 20 a vertex array object and selects this vertex array and its associated 21 state as current. To get back to the default vertex array and its 22 associated state the client should bind to vertex array named 0. 23 24 Once a client is done using a vertex array object it can be deleted with 25 DeleteVertexArraysAPPLE. The client is responsible for allocating and 26 deallocating the memory used by the vertex array data, while the 27 DeleteVertexArraysAPPLE command deletes vertex array object names and 28 associated state only. 29 30The official definition of this extension is available here: 31http://www.opengl.org/registry/specs/APPLE/vertex_array_object.txt 32''' 33from OpenGL import platform, constant, arrays 34from OpenGL import extensions, wrapper 35import ctypes 36from OpenGL.raw.GL import _types, _glgets 37from OpenGL.raw.GL.APPLE.vertex_array_object import * 38from OpenGL.raw.GL.APPLE.vertex_array_object import _EXTENSION_NAME 39 40def glInitVertexArrayObjectAPPLE(): 41 '''Return boolean indicating whether this extension is available''' 42 from OpenGL import extensions 43 return extensions.hasGLExtension( _EXTENSION_NAME ) 44 45# INPUT glDeleteVertexArraysAPPLE.arrays size not checked against n 46glDeleteVertexArraysAPPLE=wrapper.wrapper(glDeleteVertexArraysAPPLE).setInputArraySize( 47 'arrays', None 48) 49glGenVertexArraysAPPLE=wrapper.wrapper(glGenVertexArraysAPPLE).setOutput( 50 'arrays',size=lambda x:(x,),pnameArg='n',orPassIn=True 51) 52### END AUTOGENERATED SECTION