1'''OpenGL extension NV.path_rendering
2
3This module customises the behaviour of the
4OpenGL.raw.GL.NV.path_rendering to provide a more
5Python-friendly API
6
7Overview (from the spec)
8
9	Conventional OpenGL supports rendering images (pixel rectangles and
10	bitmaps) and simple geometric primitives (points, lines, polygons).
11
12	This extension adds a new rendering paradigm, known as path rendering,
13	for rendering filled and stroked paths.  Path rendering is not novel
14	but rather a standard part of most resolution-independent 2D rendering
15	systems such as Flash, PDF, Silverlight, SVG, Java 2D, Office
16	drawings, TrueType fonts, PostScript and its fonts, Quartz 2D, XML
17	Paper Specification (XPS), and OpenVG.  What is novel is the ability
18	to mix path rendering with arbitrary OpenGL 3D rendering and imaging.
19
20	With this extension, path rendering becomes a first-class rendering
21	mode within the OpenGL graphics system that can be arbitrarily mixed
22	with existing OpenGL rendering and can take advantage of OpenGL's
23	existing mechanisms for texturing, programmability, and per-fragment
24	operations.
25
26	Unlike geometric primitive rendering, paths are specified on a 2D
27	(non-projective) plane rather than in 3D (projective) space.
28	Even though the path is defined in a 2D plane, every path can
29	be transformed into 3D clip space allowing for 3D view frustum &
30	user-defined clipping, depth offset, and depth testing in the same
31	manner as geometric primitive rendering.
32
33	Both geometric primitive rendering and path rendering support
34	rasterization of edges defined by line segments; however, path
35	rendering also allows path segments to be specified by Bezier (cubic
36	or quadratic) curves or partial elliptical arcs.  This allows path
37	rendering to define truly curved primitive boundaries unlike the
38	straight edges of line and polygon primitives.  Whereas geometric
39	primitive rendering requires convex polygons for well-defined
40	rendering results, path rendering allows (and encourages!) concave
41	and curved outlines to be specified.  These paths are even allowed
42	to self-intersect.
43
44	When filling closed paths, the winding of paths (counterclockwise
45	or clockwise) determines whether pixels are inside or outside of
46	the path.
47
48	Paths can also be stroked whereby, conceptually, a fixed-width "brush"
49	is pulled along the path such that the brush remains orthogonal to
50	the gradient of each path segment.  Samples within the sweep of this
51	brush are considered inside the stroke of the path.
52
53	This extension supports path rendering through a sequence of three
54	operations:
55
56	    1.  Path specification is the process of creating and updating
57	        a path object consisting of a set of path commands and a
58	        corresponding set of 2D vertices.
59
60	        Path commands can be specified explicitly from path command
61	        and coordinate data, parsed from a string based on standard
62	        grammars for representing paths, or specified by a particular
63	        glyph of standard font representations.  Also new paths can
64	        be specified by weighting one or more existing paths so long
65	        as all the weighted paths have consistent command sequences.
66
67	        Each path object contains zero or more subpaths specified
68	        by a sequence of line segments, partial elliptical arcs,
69	        and (cubic or quadratic) Bezier curve segments.  Each path
70	        may contain multiple subpaths that can be closed (forming
71	        a contour) or open.
72
73	    2.  Path stenciling is the process of updating the stencil buffer
74	        based on a path's coverage transformed into window space.
75
76	        Path stenciling can determine either the filled or stroked
77	        coverage of a path.
78
79	        The details of path stenciling are explained within the core
80	        of the specification.
81
82	        Stenciling a stroked path supports all the standard
83	        embellishments for path stroking such as end caps, join
84	        styles, miter limits, dashing, and dash caps.  These stroking
85	        properties specified are parameters of path objects.
86
87	    3.  Path covering is the process of emitting simple (convex &
88	        planar) geometry that (conservatively) "covers" the path's
89	        sample coverage in the stencil buffer.  During path covering,
90	        stencil testing can be configured to discard fragments not
91	        within the actual coverage of the path as determined by
92	        prior path stenciling.
93
94	        Path covering can cover either the filled or stroked coverage
95	        of a path.
96
97	        The details of path covering are explained within the core
98	        of the specification.
99
100	To render a path object into the color buffer, an application specifies
101	a path object and then uses a two-step rendering process.  First, the
102	path object is stenciled whereby the path object's stroked or filled
103	coverage is rasterized into the stencil buffer.  Second, the path object
104	is covered whereby conservative bounding geometry for the path is
105	transformed and rasterized with stencil testing configured to test against
106	the coverage information written to the stencil buffer in the first step
107	so that only fragments covered by the path are written during this second
108	step.  Also during this second step written pixels typically have
109	their stencil value reset (so there's no need for clearing the
110	stencil buffer between rendering each path).
111
112	Here is an example of specifying and then rendering a five-point
113	star and a heart as a path using Scalable Vector Graphics (SVG)
114	path description syntax:
115
116	    GLuint pathObj = 42;
117	    const char *svgPathString =
118	      // star
119	      "M100,180 L40,10 L190,120 L10,120 L160,10 z"
120	      // heart
121	      "M300 300 C 100 400,100 200,300 100,500 200,500 400,300 300Z";
122	    glPathStringNV(pathObj, GL_PATH_FORMAT_SVG_NV,
123	                   (GLsizei)strlen(svgPathString), svgPathString);
124
125	Alternatively applications oriented around the PostScript imaging
126	model can use the PostScript user path syntax instead:
127
128	    const char *psPathString =
129	      // star
130	      "100 180 moveto"
131	      " 40 10 lineto 190 120 lineto 10 120 lineto 160 10 lineto closepath"
132	      // heart
133	      " 300 300 moveto"
134	      " 100 400 100 200 300 100 curveto"
135	      " 500 200 500 400 300 300 curveto closepath";
136	    glPathStringNV(pathObj, GL_PATH_FORMAT_PS_NV,
137	                   (GLsizei)strlen(psPathString), psPathString);
138
139	The PostScript path syntax also supports compact and precise binary
140	encoding and includes PostScript-style circular arcs.
141
142	Or the path's command and coordinates can be specified explicitly:
143
144	    static const GLubyte pathCommands[10] =
145	      { GL_MOVE_TO_NV, GL_LINE_TO_NV, GL_LINE_TO_NV, GL_LINE_TO_NV,
146	        GL_LINE_TO_NV, GL_CLOSE_PATH_NV,
147	        'M', 'C', 'C', 'Z' };  // character aliases
148	    static const GLshort pathCoords[12][2] =
149	      { {100, 180}, {40, 10}, {190, 120}, {10, 120}, {160, 10},
150	        {300,300}, {100,400}, {100,200}, {300,100},
151	        {500,200}, {500,400}, {300,300} };
152	    glPathCommandsNV(pathObj, 10, pathCommands, 24, GL_SHORT, pathCoords);
153
154	Before rendering to a window with a stencil buffer, clear the stencil
155	buffer to zero and the color buffer to black:
156
157	    glClearStencil(0);
158	    glClearColor(0,0,0,0);
159	    glStencilMask(~0);
160	    glClear(GL_COLOR_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
161
162	Use an orthographic path-to-clip-space transform to map the
163	[0..500]x[0..400] range of the star's path coordinates to the [-1..1]
164	clip space cube:
165
166	    glMatrixLoadIdentityEXT(GL_PROJECTION);
167	    glMatrixLoadIdentityEXT(GL_MODELVIEW);
168	    glMatrixOrthoEXT(GL_MODELVIEW, 0, 500, 0, 400, -1, 1);
169
170	Stencil the path:
171
172	    glStencilFillPathNV(pathObj, GL_COUNT_UP_NV, 0x1F);
173
174	The 0x1F mask means the counting uses modulo-32 arithmetic. In
175	principle the star's path is simple enough (having a maximum winding
176	number of 2) that modulo-4 arithmetic would be sufficient so the mask
177	could be 0x3.  Or a mask of all 1's (~0) could be used to count with
178	all available stencil bits.
179
180	Now that the coverage of the star and the heart have been rasterized
181	into the stencil buffer, cover the path with a non-zero fill style
182	(indicated by the GL_NOTEQUAL stencil function with a zero reference
183	value):
184
185	    glEnable(GL_STENCIL_TEST);
186	    glStencilFunc(GL_NOTEQUAL, 0, 0x1F);
187	    glStencilOp(GL_KEEP, GL_KEEP, GL_ZERO);
188	    glColor3f(1,1,0); // yellow
189	    glCoverFillPathNV(pathObj, GL_BOUNDING_BOX_NV);
190
191	The result is a yellow star (with a filled center) to the left of
192	a yellow heart.
193
194	The GL_ZERO stencil operation ensures that any covered samples
195	(meaning those with non-zero stencil values) are zero'ed when
196	the path cover is rasterized. This allows subsequent paths to be
197	rendered without clearing the stencil buffer again.
198
199	A similar two-step rendering process can draw a white outline
200	over the star and heart.
201
202	Before rendering, configure the path object with desirable path
203	parameters for stroking.  Specify a wider 6.5-unit stroke and
204	the round join style:
205
206	    glPathParameteriNV(pathObj, GL_PATH_JOIN_STYLE_NV, GL_ROUND_NV);
207	    glPathParameterfNV(pathObj, GL_PATH_STROKE_WIDTH_NV, 6.5);
208
209	 Now stencil the path's stroked coverage into the stencil buffer,
210	 setting the stencil to 0x1 for all stencil samples within the
211	 transformed path.
212
213	    glStencilStrokePathNV(pathObj, 0x1, ~0);
214
215	 Cover the path's stroked coverage (with a hull this time instead
216	 of a bounding box; the choice doesn't really matter here) while
217	 stencil testing that writes white to the color buffer and again
218	 zero the stencil buffer.
219
220	    glColor3f(1,1,1); // white
221	    glCoverStrokePathNV(pathObj, GL_CONVEX_HULL_NV);
222
223	 In this example, constant color shading is used but the application
224	 can specify their own arbitrary shading and/or blending operations,
225	 whether with Cg compiled to fragment program assembly, GLSL, or
226	 fixed-function fragment processing.
227
228	 More complex path rendering is possible such as clipping one path to
229	 another arbitrary path.  This is because stencil testing (as well
230	 as depth testing, depth bound test, clip planes, and scissoring)
231	 can restrict path stenciling.
232
233	 Now let's render the word "OpenGL" atop the star and heart.
234
235	 First create a sequence of path objects for the glyphs for the
236	 characters in "OpenGL":
237
238	    GLuint glyphBase = glGenPathsNV(6);
239	    const unsigned char *word = "OpenGL";
240	    const GLsizei wordLen = (GLsizei)strlen(word);
241	    const GLfloat emScale = 2048;  // match TrueType convention
242	    GLuint templatePathObject = ~0;  // Non-existent path object
243	    glPathGlyphsNV(glyphBase,
244	                   GL_SYSTEM_FONT_NAME_NV, "Helvetica", GL_BOLD_BIT_NV,
245	                   wordLen, GL_UNSIGNED_BYTE, word,
246	                   GL_SKIP_MISSING_GLYPH_NV, ~0, emScale);
247	    glPathGlyphsNV(glyphBase,
248	                   GL_SYSTEM_FONT_NAME_NV, "Arial", GL_BOLD_BIT_NV,
249	                   wordLen, GL_UNSIGNED_BYTE, word,
250	                   GL_SKIP_MISSING_GLYPH_NV, ~0, emScale);
251	    glPathGlyphsNV(glyphBase,
252	                   GL_STANDARD_FONT_NAME_NV, "Sans", GL_BOLD_BIT_NV,
253	                   wordLen, GL_UNSIGNED_BYTE, word,
254	                   GL_USE_MISSING_GLYPH_NV, ~0, emScale);
255
256	Glyphs are loaded for three different fonts in priority order:
257	Helvetica first, then Arial, and if neither of those loads, use the
258	standard sans-serif font.  If a prior glPathGlyphsNV is successful
259	and specifies the path object range, the subsequent glPathGlyphsNV
260	commands silently avoid re-specifying the already existent path
261	objects.
262
263	Now query the (kerned) separations for the word "OpenGL" and build
264	a set of horizontal translations advancing each successive glyph by
265	its kerning distance with the following glyph.
266
267	    GLfloat xtranslate[6+1];  // wordLen+1
268	    glGetPathSpacingNV(GL_ACCUM_ADJACENT_PAIRS_NV,
269	                       wordLen+1, GL_UNSIGNED_BYTE,
270	                       "\000\001\002\003\004\005\005",  // repeat last letter twice
271	                       glyphBase,
272	                       1.0f, 1.0f,
273	                       GL_TRANSLATE_X_NV,
274	                       xtranslate);
275
276	Next determine the font-wide vertical minimum and maximum for the
277	font face by querying the per-font metrics of any one of the glyphs
278	from the font face.
279
280	    GLfloat yMinMax[2];
281	    glGetPathMetricRangeNV(GL_FONT_Y_MIN_BOUNDS_BIT_NV|GL_FONT_Y_MAX_BOUNDS_BIT_NV,
282	                           glyphBase, /*count*/1,
283	                           2*sizeof(GLfloat),
284	                           yMinMax);
285
286	Use an orthographic path-to-clip-space transform to map the
287	word's bounds to the [-1..1] clip space cube:
288
289	    glMatrixLoadIdentityEXT(GL_PROJECTION);
290	    glMatrixOrthoEXT(GL_MODELVIEW,
291	                     0, xtranslate[6], yMinMax[0], yMinMax[1],
292	                     -1, 1);
293
294	Stencil the filled paths of the sequence of glyphs for "OpenGL",
295	each transformed by the appropriate 2D translations for spacing.
296
297	    glStencilFillPathInstancedNV(6, GL_UNSIGNED_BYTE,
298	                                 "\000\001\002\003\004\005",
299	                                 glyphBase,
300	                                 GL_PATH_FILL_MODE_NV, 0xFF,
301	                                 GL_TRANSLATE_X_NV, xtranslate);
302
303	 Cover the bounding box union of the glyphs with 50% gray.
304
305	    glEnable(GL_STENCIL_TEST);
306	    glStencilFunc(GL_NOTEQUAL, 0, 0xFF);
307	    glStencilOp(GL_KEEP, GL_KEEP, GL_ZERO);
308	    glColor3f(0.5,0.5,0.5); // 50% gray
309	    glCoverFillPathInstancedNV(6, GL_UNSIGNED_BYTE,
310	                               "\000\001\002\003\004\005",
311	                               glyphBase,
312	                               GL_BOUNDING_BOX_OF_BOUNDING_BOXES_NV,
313	                               GL_TRANSLATE_X_NV, xtranslate);
314
315	Voila, the word "OpenGL" in gray is now stenciled into the framebuffer.
316
317	Instead of solid 50% gray, the cover operation can apply a linear
318	gradient that changes from green (RGB=0,1,0) at the top of the word
319	"OpenGL" to blue (RGB=0,0,1) at the bottom of "OpenGL":
320
321	    GLfloat rgbGen[3][3] = {
322	      0, 0, 0,  // red   = constant zero
323	      0, 1, 0,  // green = varies with y from bottom (0) to top (1)
324	      0, -1, 1  // blue  = varies with y from bottom (1) to top (0)
325	    };
326	    glPathColorGenNV(GL_PRIMARY_COLOR, GL_PATH_OBJECT_BOUNDING_BOX_NV,
327	                     GL_RGB, &rgbGen[0][0]);
328
329	Instead of loading just the glyphs for the characters in "OpenGL",
330	the entire character set could be loaded.  This allows the characters
331	of the string to be mapped (offset by the glyphBase) to path object names.
332	A range of glyphs can be loaded like this:
333
334	    const int numChars = 256;  // ISO/IEC 8859-1 8-bit character range
335	    GLuint glyphBase = glGenPathsNV(numChars);
336	    glPathGlyphRangeNV(glyphBase,
337	                       GL_SYSTEM_FONT_NAME_NV, "Helvetica", GL_BOLD_BIT_NV,
338	                       0, numChars,
339	                       GL_SKIP_MISSING_GLYPH_NV, ~0, emScale);
340	    glPathGlyphRangeNV(glyphBase,
341	                       GL_SYSTEM_FONT_NAME_NV, "Arial", GL_BOLD_BIT_NV,
342	                       0, numChars,
343	                       GL_SKIP_MISSING_GLYPH_NV, ~0, emScale);
344	    glPathGlyphRangeNV(glyphBase,
345	                       GL_STANDARD_FONT_NAME_NV, "Sans", GL_BOLD_BIT_NV,
346	                       0, numChars,
347	                       GL_USE_MISSING_GLYPH_NV, ~0, emScale);
348
349	Given a range of glyphs loaded as path objects, (kerned) spacing
350	information can now be queried for the string:
351
352	    glGetPathSpacingNV(GL_ACCUM_ADJACENT_PAIRS_NV,
353	                       7, GL_UNSIGNED_BYTE, "OpenGLL", // repeat L to get final spacing
354	                       glyphBase,
355	                       1.0f, 1.0f,
356	                       GL_TRANSLATE_X_NV,
357	                       kerning);
358
359	Using the range of glyphs, stenciling and covering the instanced
360	paths for "OpenGL" can be done this way:
361
362	    glStencilFillPathInstancedNV(6, GL_UNSIGNED_BYTE, "OpenGL",
363	                                 glyphBase,
364	                                 GL_PATH_FILL_MODE_NV, 0xFF,
365	                                 GL_TRANSLATE_X_NV, xtranslate);
366
367	    glCoverFillPathInstancedNV(6, GL_UNSIGNED_BYTE, "OpenGL",
368	                               glyphBase,
369	                               GL_BOUNDING_BOX_OF_BOUNDING_BOXES_NV,
370	                               GL_TRANSLATE_X_NV, xtranslate);
371
372	The "stencil" and "cover" steps can be combined in a single command:
373
374	    glStencilThenCoverFillPathInstancedNV(6, GL_UNSIGNED_BYTE, "OpenGL",
375	                                          glyphBase,
376	                                          GL_PATH_FILL_MODE_NV, 0xFF,
377	                                          GL_BOUNDING_BOX_OF_BOUNDING_BOXES_NV
378	                                          GL_TRANSLATE_X_NV, xtranslate);
379
380	XXX add path clipping example to demonstrate glPathStencilFuncNV.
381
382The official definition of this extension is available here:
383http://www.opengl.org/registry/specs/NV/path_rendering.txt
384'''
385from OpenGL import platform, constant, arrays
386from OpenGL import extensions, wrapper
387import ctypes
388from OpenGL.raw.GL import _types, _glgets
389from OpenGL.raw.GL.NV.path_rendering import *
390from OpenGL.raw.GL.NV.path_rendering import _EXTENSION_NAME
391
392def glInitPathRenderingNV():
393    '''Return boolean indicating whether this extension is available'''
394    from OpenGL import extensions
395    return extensions.hasGLExtension( _EXTENSION_NAME )
396
397# INPUT glPathCommandsNV.commands size not checked against numCommands
398# INPUT glPathCommandsNV.coords size not checked against 'numCoords,coordType'
399glPathCommandsNV=wrapper.wrapper(glPathCommandsNV).setInputArraySize(
400    'commands', None
401).setInputArraySize(
402    'coords', None
403)
404# INPUT glPathCoordsNV.coords size not checked against 'numCoords,coordType'
405glPathCoordsNV=wrapper.wrapper(glPathCoordsNV).setInputArraySize(
406    'coords', None
407)
408# INPUT glPathSubCommandsNV.commands size not checked against numCommands
409# INPUT glPathSubCommandsNV.coords size not checked against 'numCoords,coordType'
410glPathSubCommandsNV=wrapper.wrapper(glPathSubCommandsNV).setInputArraySize(
411    'commands', None
412).setInputArraySize(
413    'coords', None
414)
415# INPUT glPathSubCoordsNV.coords size not checked against 'numCoords,coordType'
416glPathSubCoordsNV=wrapper.wrapper(glPathSubCoordsNV).setInputArraySize(
417    'coords', None
418)
419# INPUT glPathStringNV.pathString size not checked against length
420glPathStringNV=wrapper.wrapper(glPathStringNV).setInputArraySize(
421    'pathString', None
422)
423# INPUT glPathGlyphsNV.charcodes size not checked against 'numGlyphs,type,charcodes'
424# INPUT glPathGlyphsNV.fontName size not checked against 'fontTarget,fontName'
425glPathGlyphsNV=wrapper.wrapper(glPathGlyphsNV).setInputArraySize(
426    'charcodes', None
427).setInputArraySize(
428    'fontName', None
429)
430# INPUT glPathGlyphRangeNV.fontName size not checked against 'fontTarget,fontName'
431glPathGlyphRangeNV=wrapper.wrapper(glPathGlyphRangeNV).setInputArraySize(
432    'fontName', None
433)
434# INPUT glWeightPathsNV.paths size not checked against numPaths
435# INPUT glWeightPathsNV.weights size not checked against numPaths
436glWeightPathsNV=wrapper.wrapper(glWeightPathsNV).setInputArraySize(
437    'paths', None
438).setInputArraySize(
439    'weights', None
440)
441# INPUT glTransformPathNV.transformValues size not checked against 'transformType'
442glTransformPathNV=wrapper.wrapper(glTransformPathNV).setInputArraySize(
443    'transformValues', None
444)
445# INPUT glPathParameterivNV.value size not checked against 'pname'
446glPathParameterivNV=wrapper.wrapper(glPathParameterivNV).setInputArraySize(
447    'value', None
448)
449# INPUT glPathParameterfvNV.value size not checked against 'pname'
450glPathParameterfvNV=wrapper.wrapper(glPathParameterfvNV).setInputArraySize(
451    'value', None
452)
453# INPUT glPathDashArrayNV.dashArray size not checked against dashCount
454glPathDashArrayNV=wrapper.wrapper(glPathDashArrayNV).setInputArraySize(
455    'dashArray', None
456)
457# INPUT glStencilFillPathInstancedNV.paths size not checked against 'numPaths,pathNameType,paths'
458# INPUT glStencilFillPathInstancedNV.transformValues size not checked against 'numPaths,transformType'
459glStencilFillPathInstancedNV=wrapper.wrapper(glStencilFillPathInstancedNV).setInputArraySize(
460    'paths', None
461).setInputArraySize(
462    'transformValues', None
463)
464# INPUT glStencilStrokePathInstancedNV.paths size not checked against 'numPaths,pathNameType,paths'
465# INPUT glStencilStrokePathInstancedNV.transformValues size not checked against 'numPaths,transformType'
466glStencilStrokePathInstancedNV=wrapper.wrapper(glStencilStrokePathInstancedNV).setInputArraySize(
467    'paths', None
468).setInputArraySize(
469    'transformValues', None
470)
471# INPUT glCoverFillPathInstancedNV.paths size not checked against 'numPaths,pathNameType,paths'
472# INPUT glCoverFillPathInstancedNV.transformValues size not checked against 'numPaths,transformType'
473glCoverFillPathInstancedNV=wrapper.wrapper(glCoverFillPathInstancedNV).setInputArraySize(
474    'paths', None
475).setInputArraySize(
476    'transformValues', None
477)
478# INPUT glCoverStrokePathInstancedNV.paths size not checked against 'numPaths,pathNameType,paths'
479# INPUT glCoverStrokePathInstancedNV.transformValues size not checked against 'numPaths,transformType'
480glCoverStrokePathInstancedNV=wrapper.wrapper(glCoverStrokePathInstancedNV).setInputArraySize(
481    'paths', None
482).setInputArraySize(
483    'transformValues', None
484)
485glGetPathParameterivNV=wrapper.wrapper(glGetPathParameterivNV).setOutput(
486    'value',size=(4,),orPassIn=True
487)
488glGetPathParameterfvNV=wrapper.wrapper(glGetPathParameterfvNV).setOutput(
489    'value',size=(4,),orPassIn=True
490)
491glGetPathCommandsNV=wrapper.wrapper(glGetPathCommandsNV).setOutput(
492    'commands',size=_glgets._glget_size_mapping,pnameArg='path',orPassIn=True
493)
494glGetPathCoordsNV=wrapper.wrapper(glGetPathCoordsNV).setOutput(
495    'coords',size=_glgets._glget_size_mapping,pnameArg='path',orPassIn=True
496)
497glGetPathDashArrayNV=wrapper.wrapper(glGetPathDashArrayNV).setOutput(
498    'dashArray',size=_glgets._glget_size_mapping,pnameArg='path',orPassIn=True
499)
500# OUTPUT glGetPathMetricsNV.metrics COMPSIZE(metricQueryMask, numPaths, stride)
501# INPUT glGetPathMetricsNV.paths size not checked against 'numPaths,pathNameType,paths'
502glGetPathMetricsNV=wrapper.wrapper(glGetPathMetricsNV).setInputArraySize(
503    'paths', None
504)
505# OUTPUT glGetPathMetricRangeNV.metrics COMPSIZE(metricQueryMask, numPaths, stride)
506# INPUT glGetPathSpacingNV.paths size not checked against 'numPaths,pathNameType,paths'
507# OUTPUT glGetPathSpacingNV.returnedSpacing COMPSIZE(pathListMode, numPaths)
508glGetPathSpacingNV=wrapper.wrapper(glGetPathSpacingNV).setInputArraySize(
509    'paths', None
510)
511glPointAlongPathNV=wrapper.wrapper(glPointAlongPathNV).setOutput(
512    'tangentX',size=(1,),orPassIn=True
513).setOutput(
514    'tangentY',size=(1,),orPassIn=True
515).setOutput(
516    'x',size=(1,),orPassIn=True
517).setOutput(
518    'y',size=(1,),orPassIn=True
519)
520# INPUT glPathColorGenNV.coeffs size not checked against 'genMode,colorFormat'
521glPathColorGenNV=wrapper.wrapper(glPathColorGenNV).setInputArraySize(
522    'coeffs', None
523)
524# INPUT glPathTexGenNV.coeffs size not checked against 'genMode,components'
525glPathTexGenNV=wrapper.wrapper(glPathTexGenNV).setInputArraySize(
526    'coeffs', None
527)
528glGetPathColorGenivNV=wrapper.wrapper(glGetPathColorGenivNV).setOutput(
529    'value',size=_glgets._glget_size_mapping,pnameArg='pname',orPassIn=True
530)
531glGetPathColorGenfvNV=wrapper.wrapper(glGetPathColorGenfvNV).setOutput(
532    'value',size=_glgets._glget_size_mapping,pnameArg='pname',orPassIn=True
533)
534glGetPathTexGenivNV=wrapper.wrapper(glGetPathTexGenivNV).setOutput(
535    'value',size=_glgets._glget_size_mapping,pnameArg='pname',orPassIn=True
536)
537glGetPathTexGenfvNV=wrapper.wrapper(glGetPathTexGenfvNV).setOutput(
538    'value',size=_glgets._glget_size_mapping,pnameArg='pname',orPassIn=True
539)
540glMatrixLoadTransposefEXT=wrapper.wrapper(glMatrixLoadTransposefEXT).setInputArraySize(
541    'm', 16
542)
543glMatrixLoadTransposedEXT=wrapper.wrapper(glMatrixLoadTransposedEXT).setInputArraySize(
544    'm', 16
545)
546glMatrixLoadfEXT=wrapper.wrapper(glMatrixLoadfEXT).setInputArraySize(
547    'm', 16
548)
549glMatrixLoaddEXT=wrapper.wrapper(glMatrixLoaddEXT).setInputArraySize(
550    'm', 16
551)
552glMatrixMultTransposefEXT=wrapper.wrapper(glMatrixMultTransposefEXT).setInputArraySize(
553    'm', 16
554)
555glMatrixMultTransposedEXT=wrapper.wrapper(glMatrixMultTransposedEXT).setInputArraySize(
556    'm', 16
557)
558glMatrixMultfEXT=wrapper.wrapper(glMatrixMultfEXT).setInputArraySize(
559    'm', 16
560)
561glMatrixMultdEXT=wrapper.wrapper(glMatrixMultdEXT).setInputArraySize(
562    'm', 16
563)
564### END AUTOGENERATED SECTION