1'''OpenGL extension NV.transform_feedback2
2
3This module customises the behaviour of the
4OpenGL.raw.GL.NV.transform_feedback2 to provide a more
5Python-friendly API
6
7Overview (from the spec)
8
9	The NV_transform_feedback and EXT_transform_feedback extensions allow
10	applications to capture primitives to one or more buffer objects when
11	transformed by the GL.  This extension provides a few additional
12	capabilities to these extensions, making transform feedback mode
13	more useful.
14
15	First, it provides transform feedback objects encapsulating transform
16	feedback-related state, allowing applications to replace the entire
17	transform feedback configuration in a single bind call.  Second, it
18	provides the ability to pause and resume transform feedback operations.
19	When transform feedback is paused, applications may render without
20	transform feedback or may use transform feedback with different state and
21	a different transform feedback object.  When transform feedback is
22	resumed, additional primitives are captured and appended to previously
23	captured primitives for the object.
24
25	Additionally, this extension provides the ability to draw primitives
26	captured in transform feedback mode without querying the captured
27	primitive count.  The command DrawTransformFeedbackNV() is equivalent to
28	glDrawArrays(<mode>, 0, <count>), where <count> is the number of vertices
29	captured to buffer objects during the last transform feedback capture
30	operation on the transform feedback object used.  This draw operation only
31	provides a vertex count -- it does not automatically set up vertex array
32	state or vertex buffer object bindings, which must be done separately by
33	the application.
34
35The official definition of this extension is available here:
36http://www.opengl.org/registry/specs/NV/transform_feedback2.txt
37'''
38from OpenGL import platform, constant, arrays
39from OpenGL import extensions, wrapper
40import ctypes
41from OpenGL.raw.GL import _types, _glgets
42from OpenGL.raw.GL.NV.transform_feedback2 import *
43from OpenGL.raw.GL.NV.transform_feedback2 import _EXTENSION_NAME
44
45def glInitTransformFeedback2NV():
46    '''Return boolean indicating whether this extension is available'''
47    from OpenGL import extensions
48    return extensions.hasGLExtension( _EXTENSION_NAME )
49
50# INPUT glDeleteTransformFeedbacksNV.ids size not checked against n
51glDeleteTransformFeedbacksNV=wrapper.wrapper(glDeleteTransformFeedbacksNV).setInputArraySize(
52    'ids', None
53)
54glGenTransformFeedbacksNV=wrapper.wrapper(glGenTransformFeedbacksNV).setOutput(
55    'ids',size=lambda x:(x,),pnameArg='n',orPassIn=True
56)
57### END AUTOGENERATED SECTION