Lines Matching full:path

72     This extension adds a new rendering paradigm, known as path rendering,
73 for rendering filled and stroked paths. Path rendering is not novel
78 to mix path rendering with arbitrary OpenGL 3D rendering and imaging.
80 With this extension, path rendering becomes a first-class rendering
88 Even though the path is defined in a 2D plane, every path can
93 Both geometric primitive rendering and path rendering support
94 rasterization of edges defined by line segments; however, path
95 rendering also allows path segments to be specified by Bezier (cubic
96 or quadratic) curves or partial elliptical arcs. This allows path
100 rendering results, path rendering allows (and encourages!) concave
106 the path.
109 is pulled along the path such that the brush remains orthogonal to
110 the gradient of each path segment. Samples within the sweep of this
111 brush are considered inside the stroke of the path.
113 This extension supports path rendering through a sequence of three
116 1. Path specification is the process of creating and updating
117 a path object consisting of a set of path commands and a
120 Path commands can be specified explicitly from path command
127 Each path object contains zero or more subpaths specified
129 and (cubic or quadratic) Bezier curve segments. Each path
133 2. Path stenciling is the process of updating the stencil buffer
134 based on a path's coverage transformed into window space.
136 Path stenciling can determine either the filled or stroked
137 coverage of a path.
139 The details of path stenciling are explained within the core
142 Stenciling a stroked path supports all the standard
143 embellishments for path stroking such as end caps, join
145 properties specified are parameters of path objects.
147 3. Path covering is the process of emitting simple (convex &
148 planar) geometry that (conservatively) "covers" the path's
149 sample coverage in the stencil buffer. During path covering,
151 within the actual coverage of the path as determined by
152 prior path stenciling.
154 Path covering can cover either the filled or stroked coverage
155 of a path.
157 The details of path covering are explained within the core
160 To render a path object into the color buffer, an application specifies
161 a path object and then uses a two-step rendering process. First, the
162 path object is stenciled whereby the path object's stroked or filled
163 coverage is rasterized into the stencil buffer. Second, the path object
164 is covered whereby conservative bounding geometry for the path is
167 so that only fragments covered by the path are written during this second
170 stencil buffer between rendering each path).
173 star and a heart as a path using Scalable Vector Graphics (SVG)
174 path description syntax:
186 model can use the PostScript user path syntax instead:
199 The PostScript path syntax also supports compact and precise binary
202 Or the path's command and coordinates can be specified explicitly:
222 Use an orthographic path-to-clip-space transform to map the
223 [0..500]x[0..400] range of the star's path coordinates to the [-1..1]
230 Stencil the path:
235 principle the star's path is simple enough (having a maximum winding
241 into the stencil buffer, cover the path with a non-zero fill style
256 the path cover is rasterized. This allows subsequent paths to be
262 Before rendering, configure the path object with desirable path
269 Now stencil the path's stroked coverage into the stencil buffer,
271 transformed path.
275 Cover the path's stroked coverage (with a hull this time instead
288 More complex path rendering is possible such as clipping one path to
289 another arbitrary path. This is because stencil testing (as well
291 can restrict path stenciling.
295 First create a sequence of path objects for the glyphs for the
302 GLuint templatePathObject = ~0; // Non-existent path object
319 and specifies the path object range, the subsequent glPathGlyphsNV
320 commands silently avoid re-specifying the already existent path
346 Use an orthographic path-to-clip-space transform to map the
391 of the string to be mapped (offset by the glyphBase) to path object names.
409 Given a range of glyphs loaded as path objects, (kerned) spacing
440 XXX add path clipping example to demonstrate glPathStencilFuncNV.
444 PATH SPECIFICATION COMMANDS
446 EXPLICIT PATH DATA
448 void PathCommandsNV(uint path,
452 void PathCoordsNV(uint path,
456 void PathSubCommandsNV(uint path,
461 void PathSubCoordsNV(uint path,
466 STRING PATH DESCRIPTION
468 void PathStringNV(uint path, enum format,
518 PATH SPECIFICATION WITH EXISTING PATHS
532 PATH PARAMETER SPECIFICATION COMMANDS
534 void PathParameterivNV(uint path, enum pname, const int *value);
535 void PathParameteriNV(uint path, enum pname, int value);
536 void PathParameterfvNV(uint path, enum pname, const float *value);
537 void PathParameterfNV(uint path, enum pname, float value);
539 void PathDashArrayNV(uint path,
542 PATH NAME MANAGEMENT
545 void DeletePathsNV(uint path, sizei range);
546 boolean IsPathNV(uint path);
548 PATH STENCILING
553 void StencilFillPathNV(uint path,
556 void StencilStrokePathNV(uint path,
573 PATH COVERING
585 void CoverFillPathNV(uint path, enum coverMode);
587 void CoverStrokePathNV(uint path, enum coverMode);
603 PATH STENCILING THEN COVERING
605 void StencilThenCoverFillPathNV(uint path, enum fillMode,
607 void StencilThenCoverStrokePathNV(uint path, int reference,
626 PATH COVERING OF GLSL FRAGMENT INPUTS
634 PATH QUERIES
636 void GetPathParameterivNV(uint path, enum pname, int *value);
637 void GetPathParameterfvNV(uint path, enum pname, float *value);
639 void GetPathCommandsNV(uint path, ubyte *commands);
640 void GetPathCoordsNV(uint path, float *coords);
641 void GetPathDashArrayNV(uint path, float *dashArray);
669 boolean IsPointInFillPathNV(uint path,
671 boolean IsPointInStrokePathNV(uint path,
674 float GetPathLengthNV(uint path,
677 boolean PointAlongPathNV(uint path,
1149 more properties for fragment input path generation state:
1159 the path generation mode of an active variable is written to
1163 path generation mode. The initial state is NONE.
1166 the number of generated path components an active variable is written
1169 path generation number of components. The initial state is 0."
1230 will silently ignore the command, and the program's path fragment input
1260 (see the "TEXTURE COORDINATE SET GENERATION FOR PATH COVER COMMANDS"
1261 discussion in section 5.X.2.2 "Path Covering"). Because there is
1267 path fragment input generation state successfully generated, it as
1296 -- Insert section 5.X "Path Rendering" after 5.3 "Feedback"
1298 5.X Path Rendering
1300 5.X.1 Path Specification
1302 PATH COMMANDS
1304 Paths are specified as a sequence of path commands; each path command
1306 number of such coordinates depending on the specific path command.
1307 Coordinates are specified in a sequence independent from the path
1312 Valid path commands are listed in table 5.pathCommands. Each path
1316 As an example of how path commands associated with path coordinates,
1324 Path commands are processed in their sequence order to generate the
1325 path's outline. The outline generation process maintains three 2D
1326 (x,y) state variables for each path processed: the start position
1328 /sp/, /cp/ and /pep/ are initially (0,0) when a path starts being
1331 Table 5.pathCommands: Path Commands
1341 CLOSE_PATH_NV Close path 'Z' or 'z' 0
1342 RESTART_PATH_NV Reset the path - 0
1477 Table 5.pathEquations provides for each path command, as relevant,
1478 the command's path segment parametric equation, equations for the
1480 end point (npep). After each command in a path is processed in the
1483 point for the next path command to be processed in the sequence. So:
1488 Each path segment parametric equation is parameterized by a variable
1490 each path command's path segment parametric equation continuously
1499 C0 continuity of the outline is guaranteed at path command segment
1522 path's command sequence since the beginning of the path's command
1529 so starts a new subpath within the path.
1531 Table 5.pathEquations: Path Equations
1533 Path segment new current new prior end
1828 first command of a path object, /cp/ is (0,0)); /sp/ is the 2D (x,y)
1830 path object, /sp/ is (0,0)); /pep/ is the 2D (x,y) prior end position
1831 from the prior end position (for the first command of a path object,
1847 path and the value of said coordinate if queried (section 6.X.2)
1849 explicitly but also relatively (by RELATIVE_* path commands) or
1855 In all the rounded-rectangle path commands, the parametric segment
1856 path equations in Table 5.pathEquations are expressed in terms of
1963 In all the arc-based path commands, the parametric segment path
1988 are determined depends on the specific arc path command as
2009 * /phi/ is the angle (in radians) from the x-axis of the path
2017 arc sweeps in a counterclockwise direction in path space
2090 The arc path commands allow arbitrary numeric values so when these
2102 for each arc path command to the parameters of the arc end-point
2106 Table 5.arcParameterSpecialization: Arc Path Command
2163 PATH OBJECT SPECIFICATION
2165 Path objects can be specified in one of four ways:
2176 4) by linearly combining one or more existing path objects with
2177 mutually consistent command sequences to form a new path.
2179 In any situation where a path object is specified or re-specified,
2181 5.X.1.5 unless otherwise specified. However modification of path
2182 commands and coordinates (section 5.X.1.4) does not modify path
2185 5.X.1.1 Explicit Path Specification
2189 void PathCommandsNV(uint path,
2194 specifies a new path object named /path/ where /numCommands/
2195 indicates the number of path commands, read from the array
2196 /commands/, with which to initialize that path's command sequence.
2197 These path commands reference coordinates read sequentially from the
2220 If the PathCommandsNV command results in an error, the path object
2221 named /path/ is not changed; if there is no error, the prior contents
2222 of /path/, if /path/ was an existent path object, are lost and the
2223 path object name /path/ becomes used.
2225 5.X.1.2 String Path Specification
2229 void PathStringNV(uint path, enum format,
2232 specifies a new path object named /path/ where /format/ must be
2238 If the PathStringNV command results in an error, the path object
2239 named /path/ is not changed; if there is no error, the prior contents
2240 of /path/, if /path/ was an existent path object, are lost and the
2241 path object name /path/ becomes used.
2243 5.X.1.2.1 Scalable Vector Graphics Path Grammar
2249 This string must satisfy the "svg-path" production in the path
2254 description of the grammar for an SVG path string:
2270 svg-path:
2399 not an error, instead specifies a path with no commands.
2402 path commands in Table 5.pathCommands; each such path command, with
2403 its corresponding coordinates, is added to the path command sequence
2404 of the path object. Each production listed in Table 5.svgCommands
2405 consumes a number of coordinates consistent with the path command
2411 Table 5.svgCommands: SVG Grammar Commands to Path Command Tokens
2414 Production command character Path command token
2436 If the string fails to satisfy the svg-path production, the path
2437 object named /path/ is not changed. The production may not be
2448 5.X.1.2.2 PostScript Path Grammar
2454 This string must satisfy the "ps-path" production in the path
2455 grammar below. This grammar is parses path specified in PostScript's
2463 ps-path:
2464 ps-wsp* user-path? ps-wsp*
2465 | ps-wsp* encoded-path ps-wsp*
2466 user-path:
2467 user-path-cmd
2468 | user-path-cmd ps-wsp+ user-path
2469 user-path-cmd:
2538 encoded-path:
2699 is not an error, instead specifies a path with no commands.
2701 Table 5.psCommands maps productions in the grammar above to the path
2702 commands in Table 5.pathCommands; each such path command, with its
2703 corresponding coordinates, is added to the path command sequence
2704 of the path object. Each production listed in Table 5.svgCommands
2706 consistent with the path command token's coordinate count listed
2708 matched but do not result in path commands.
2710 Table 5.psCommands: PS Grammar Commands to Path Command Tokens
2712 Production Path command token
2737 The "encoded-path" production provides a compact and precise way
2741 values for the encoded path's commands. The "data-array"
2746 of encoded path commands, one command per byte generated by
2758 string to path commands. Each command consumes from the coordinate
2760 for the command's coordinates equal to the path command token's
2840 production to generate path commands with associated coordinates.
2865 The "encoded-path" fails to parse if invalid opcodes are detected
2869 If the string fails to satisfy the ps-path production, the path
2870 object named /path/ is not changed. The production may not be
2891 5.X.1.3 Font Glyph Path Specification
2893 PATH GLYPHS FROM CHARACTER CODE SEQUENCE
2907 creates, if no error occurs, a range of path objects named from
2913 /firstPathName/+/numGlyphs/-1 is specified as a new path object only
2914 if that name is not already in use as a path object; if a name is
2915 already in use, that named path object is silently left undisturbed.
2916 A path object name is also left undisturbed if the
2950 sequence of path objects must be populated with an identical box
2965 absolute or relative path. The name is expected to include the
2977 is generated) and the range of named path objects is not modified.
2978 If the named path objects did not exist previously, they continue
2992 The generated glyphs for the path objects named /firstPathName/
3012 Path objects created from glyphs by PathGlyphsNV have their path
3014 which they were specified. Section 6.X.3. ("Path Object Glyph
3018 are expected to be identical for every path object created from a
3030 The FONT_NUM_GLYPH_INDICES_BIT_NV metric value returns -1 for path
3034 path object is created from a character point or glyph index.
3043 If the /pathParameterTemplate/ parameter names an existing path
3044 object, that path object's current parameters listed in Table
3047 parameters of path objects specified by this command; otherwise
3048 if the /pathParameterTemplate/ path object name does not exist,
3049 the initial path parameters are used as specified by table 6.Y
3052 Path objects created from glyphs by PathGlyphsNV have their
3053 PATH_FILL_MODE_NV parameter, as explained in Section 5.X.1.5 ("Path
3064 PATH GLYPHS FROM CHARACTER CODE RANGE
3079 sequence of path objects and is equivalent to
3094 PATH GLYPHS FROM GLYPH INDEX RANGE
3118 create, if successful and no error occurs, a range of path objects
3140 When successful, path names /firstPathName/ through
3141 /firstPathName+numGlyphs-1/ now are specified as path objects
3147 actual glyph index in the font format, the respective path object is
3150 other than due to an OUT_OF_MEMORY error, no path objects are
3153 The path objects are created in the same manner described for
3154 PathGlyphsNV in section 5.X.1.3 (Font Glyph Path Specification)
3168 5.X.1.3 (Font Glyph Path Specification).
3197 creates, if successful and no error occurs, a range of path objects
3219 (Font Glyph Path Specification).
3229 path names /B/ through /B+N-1/ are previously unused (i.e. there
3230 are /N/ previously unused path object names starting at /B/) but
3231 now are specified as path objects corresponding to the complete set
3237 The path objects are created in the same manner described for
3238 PathGlyphsNV in section 5.X.1.3 (Font Glyph Path Specification)
3245 5.X.1.4 Path Modification
3248 path object to be modified.
3252 void PathCoordsNV(uint path,
3256 replaces all the coordinates of an existing path object with a new
3257 set of coordinates. /path/ names the path object to modify; the
3258 error INVALID_OPERATION is generated if /path/ is not an existing
3259 path object.
3261 The new path coordinates are read sequentially from the
3268 equal the number of coordinates referenced by the path object's
3273 If the PathCoordsNV command results in an error, the path object named
3274 /path/ is not changed; if there is no error, the prior coordinates of
3275 /path/ are lost. If there is no error, the commands and parameters
3276 of the path object are not changed.
3280 void PathSubCoordsNV(uint path,
3285 replaces a range of the coordinates of an existing path object with
3286 a new set of coordinates. /path/ names the path object to modify;
3287 the error INVALID_OPERATION is generated if /path/ is not an existing
3288 path object.
3290 The new path coordinates are read sequentially from the
3298 /coordStart/+/numCoords/-1 inclusive in the existing path object's
3301 in the existing path object, the INVALID_OPERATION error is generated.
3305 If the PathCoordsNV command results in an error, the path object named
3306 /path/ is not changed; if there is no error, the prior coordinates
3307 within the updated range of /path/ are lost. If there is no error,
3309 of the path object are not changed.
3313 void PathSubCommandsNV(uint path,
3320 with a new sequence of commands and associated coordinates. /path/
3321 names the path object to modify; the error INVALID_OPERATION is
3322 generated if /path/ is not an existing path object.
3330 path object. If /commandsToDelete/ exceeds the number of commands
3331 from /commandStart/ to the end of the path command sequence,
3336 array are inserted into the existing path object immediately before
3339 is greater than the largest valid command index of the path object,
3340 the commands are simply appended to the end of the path objects
3363 If the PathSubCommandsNV command results in an error, the path
3364 object named /path/ is not changed; if there is no error, the prior
3366 /path/ are lost. If there is no error, the commands, coordinates
3367 outside the deleted range, and parameters of the path object are not
3369 are shifted in their sequence within the path object to make room
3373 5.X.1.5 Path Parameter Specification
3375 Each path object has its own set of path parameters that control
3376 how the path object is filled and stroked when stenciled and covered.
3401 void PathParameterivNV(uint path, enum pname, const int *value);
3402 void PathParameteriNV(uint path, enum pname, int value);
3403 void PathParameterfvNV(uint path, enum pname, const float *value);
3404 void PathParameterfNV(uint path, enum pname, float value);
3406 specify the value of path parameters for the specified path object
3407 named /path/. The error INVALID_OPERATION is generated if /path/
3408 is not an existing path object.
3424 specified path parameter to that clamped value.
3428 parameters of the path with the specified value. The /pname/
3431 of the path with the specified value.
3438 The dash pattern of a path object consists of a sequence of path-space
3440 value of the dash array defines the length, in path space, of the
3445 Parameters to control the dash pattern of a stroked path are specified
3448 void PathDashArrayNV(uint path,
3451 where /path/ is the name of an existing path object. The error
3452 INVALID_OPERATION is generated if /path/ is not an existing path
3455 A /dashCount/ of zero indicates the path object is not dashed; in
3463 If an error occurs, the path object's existing dash pattern state
3466 The path parameters of a newly specified path object are initialized
3469 5.X.1.6 Path Weighting, Interpolation, and Copying
3477 linearly combines, as appropriate, the /numPaths/ path objects in
3478 the array paths based on each path object's respective weight from
3479 the weights array. The resulting path creates or replaces the
3480 path object /resultPath/. The INVALID_VALUE error is generated if
3484 array, the path resulting from the linear combination of paths
3485 replaces the source path also named /resultPath/ but not until after
3486 the linear combination path has been determined.
3492 each corresponding /i/th command in each path must have the identical
3504 in a path object passed to WeightPathsNV the INVALID_OPERATION error
3507 The weighted path has a command sequence identical to any of the
3508 input path objects to be weighted (since all the input path command
3511 The weighted path has a coordinate sequence constructed by weighting
3514 /i/ from path /j/ is weighted by the weight in /weights/ indexed
3517 The path parameters for the weighted path are copied from the path
3518 named by the first (0th) element of the /paths/ array. The path
3520 are all specified to be -1 for the newly specified path object
3521 (ignoring the path metrics for all the input path objects).
3541 copies the path object named /srcPath/ to the path object named
3547 5.X.1.7 Path Transformation
3556 transforms the path object named /srcPath/ by the transform specified
3558 The resulting path creates or replaces the path object /resultPath/.
3560 If the /resultPath/ and /srcPath/ names are identical, the path resulting
3561 from the transform replaces the name after the source path is transformed.
3618 The transformation of a path proceeds path command by path command.
3619 Each path command results in a transformed path command equivalent
3620 to what would happen if every point on the path command segment were
3654 are undisturbed by path transformation. The order of path commands
3655 is invariant under path transformation.
3657 5.X.1.8 Path Name Management
3664 previously unused (i.e. there are /range/ previously unused path object
3667 path object state until each particular name is used to specify
3668 a path object.
3670 Path objects are deleted by calling
3672 void DeletePathsNV(uint path, sizei range);
3674 where /path/ contains /range/ names of path objects to be delete.
3675 After a path object is deleted, its name is again unused. Unused
3680 boolean IsPathNV(uint path);
3682 returns TRUE if /path/ is the name of a path object. If path is
3683 not the name of a path object, or if an error condition occurs,
3685 a path specified for it yet, is not the name of a path object.
3687 5.X.2 Path Rendering
3689 Path objects update the framebuffer through one of two processes:
3690 "stenciling" that updates /just/ the stencil buffer with the path's
3692 the framebuffer for a region guaranteed to cover the region of path
3693 coverage updated by stenciling, assuming the same path object,
3697 5.X.2.1 Path Stenciling
3720 void StencilFillPathNV(uint path,
3723 transforms into window space the outline of the path object named
3724 /path/ based on the current modelview, projection, viewport,
3730 outline of the path object with any non-closed subpath forced closed
3733 If /path/ does not name an existing path object, the command does
3736 If the path's command sequence specifies unclosed subpaths (so not
3739 control points of each such path command subsequence.
3741 Transformation of a path's outline works by taking all positions
3742 on the path's outline in 2D path space (x,y) and constructing an
3746 clip-space coordinates (xc,yc,zc,wc). A path outline's clip-space
3749 mapping 2D path coordinates to 2D window coordinates and depth values.
3754 The winding number for a sample with respect to the path outline,
3757 (trivially closed if necessary) contour once in the transformed path.
3758 This traversal is performed in the order of the path's command
3768 by the command. If the /mask/ parameter is zero, the path object's
3785 PATH_FILL_MODE_NV uses the path object's counting mode parameter
3792 of two. If the /fillMode/ is PATH_FILL_MODE_NV; the path object's
3797 ACCESSIBLE SAMPLES WITH RESPECT TO A TRANSFORMED PATH
3799 The accessible samples of a transformed path that are updated are
3819 depth test comes from the depth plane of the path when
3836 based on the path stencil function state configured by
3844 case the stencil test fails during a path stencil operation,
3855 void StencilStrokePathNV(uint path,
3858 transforms into window space the stroked region of the path object
3859 named /path/ based on the current modelview, projection, viewport,
3865 If /path/ does not name an existing path object, the command does
3868 The path object's stroke width parameter (PATH_STROKE_WIDTH_NV) in
3869 path space units determines the width of the path's stroked region.
3871 When the dash array count of a path object is zero (dashing is
3872 considered subsequently), the stroke of a transformed path's outline
3876 determined) effective stroke width along each path segment
3877 in the path's transformed outline.
3881 in the path. For a sequence of commands that form a closed
3884 * Join style regions (explained below) between connected path
3888 considered within the path object's stroke.
3891 by the command. If the /mask/ parameter is zero, the path object's
3898 the transformed path's outline.
3900 Every path object has an initial and terminal end cap parameter
3916 Every path object has a join style parameter (PATH_JOIN_STYLE_NV)
3918 or NONE; each path object also has a miter limit value. The BEVEL_NV
3920 corners where two connected path segments join and a third vertex at
3921 the common end point shared by the two path segments. The ROUND_NV
3923 the common end point shared by the two path segments; the radius of
3927 the two connected path segments join and two opposite vertices with
3928 one on the path's junction between the two joining path segments and
3929 the other at the common end point shared by the two path segments.
3932 is less than the path object's PATH_STROKE_WIDTH value divided by
3933 the path's PATH_MITER_LIMIT_NV value. The MITER_TRUNCATE_NV join
3939 When the dash array count of a path object is /not/ zero, the path is
3940 broken up into a sequence of paths based on the path object's dash
3948 the dash array defines the length, in path space, of the first "on"
3953 The initial cap of the first dash segment uses the path's initial
3956 of the last dash segment uses the path's terminal dash cap style
3962 The MOVE_TO_RESETS_NV value for a path's dash offset reset parameter
3964 path's dash offset parameter upon a MOVE_TO_NV, RELATIVE_MOVE_TO_NV,
3966 or explicit move-to) while dashing the path's command sequence.
3971 Every path object has a stroke approximation bound parameter
3974 path parameter. Exact determination of samples swept an orthogonal
3979 the path object's stroke width. Specifically, this path parameter
3981 object space units of the exact sweep of the path's cubic Bezier
3986 where /sw/ is the path object's stroke width. The initial value
3987 of /sab/ when a path is created is 0.2. In practical terms, this
3992 If the path object's client length parameter (PATH_CLIENT_LENGTH_NV)
3995 by) the clen/plen where /plen/ is the path object's computed length
3998 5.X.2.2 Path Covering
4012 void CoverFillPathNV(uint path, enum coverMode);
4014 transforms into window space the outline of the path object named
4015 /path/ based on the current modelview, projection, viewport,
4028 If /path/ does not name an existing path object, the command does
4032 PATH_FILL_COVER_MODE_NV. The PATH_FILL_COVER_MODE_NV uses the path
4041 to the path space coordinate system. (The area of the bounding
4042 box in path space is guaranteed to be greater than or equal the
4043 area of the convex hull in path space.) Each rasterized sample
4052 stenciled by the path object.
4055 calling CoverFillPathNV for the same (unchanged) path object with
4065 void CoverStrokePathNV(uint path, enum coverMode);
4068 guaranteed to be rasterized is, rather than the region within /path/'s
4069 filled outline, instead the region within the /path/'s stroked region
4079 the path object's PATH_STROKE_COVER_MODE_NV parameter value as the
4082 If /path/ does not name an existing path object, the command does
4092 calling CoverStrokePathNV for the same (unchanged) path object with
4098 PATH COVERING RASTERIZATION DETAILS
4100 The GL processes fragments rasterized by path cover commands in
4102 rasterization. However path rendering /ignores/ the following
4105 * Interpolation of per-vertex data (section 3.6.1). Path
4109 linear function of object-space or eye-space path coordinate's
4115 * Polygon mode (section 3.6.4). Fragments generated by path
4119 polygon multisample rasterization (3.6.6) do apply to path covering.
4123 polygons. The path's convex hull, bounding box, or multiple hulls
4128 if the path is front facing or not. Because the specific vertices
4131 3.8) is sufficiently near zero, the facingness of the path in such
4134 The determination of whether a path transformed into window space is
4139 Once fragments have been generated by path covering, the fragments
4149 COLOR GENERATION FOR PATH COVER COMMANDS
4173 path coordinates (x,y). EYE_LINEAR means the specified color
4174 is generated from a linear combination of path's 2D coordinates
4182 [0..1]x[0..1] range where (0,0) is the corner of the path object's
4184 is the corner of the path object's bounding box with the maximum x and
4187 of the path's bounding box is zero.
4194 the union of bounding boxes of the set of instanced path objects and
4203 In the following equations used for path color generation, coeffs[i]
4207 path is covered; and x, y, z, and w are determined by the /genMode/.
4362 The state required for path color generation for each color (primary
4363 and secondary) is a four-valued integer for the path color generation
4373 TEXTURE COORDINATE SET GENERATION FOR PATH COVER COMMANDS
4404 by /texCoordSet/ when the path is covered; and x, y, z, and w are
4539 The state required for path color generation for each texture
4540 coordinate set is a four-valued integer for the path texture
4550 FOG COORDINATE GENERATION FOR PATH COVER COMMANDS
4565 filled or stroked path.
4569 Z coordinate from transforming of path's 2D coordinates transformed
4573 The state required for path fog generation is a two-valued integer for
4574 the path fog generation mode; the mode is initially FRAGMENT_DEPTH.
4576 5.X.2.3 Instanced Path Stenciling and Covering
4578 Path rendering often depends on rendering a collection of paths at
4581 usage efficiently, GL includes commands for instanced path stenciling
4595 The /pathBase/ is an offset added to the /numPaths/ path names read
4908 uint path;
5052 in section 6.X.1 ("Path Object Parameter Queries").
5093 5.X.2.4 Path Stenciling Then Covering
5100 void StencilThenCoverFillPathNV(uint path, enum fillMode, uint mask, enum coverMode);
5104 StencilFillPathNV(path, fillMode, mask);
5105 CoverFillPathNV(path, coverMode);
5112 void StencilThenCoverStrokePathNV(uint path, int reference, uint mask, enum coverMode);
5116 StencilStrokePathNV(uint path, int reference, uint mask);
5117 CoverStrokePathNV(uint path, enum coverMode);
5184 "Path objects: GenPathsNV, DeletePathsNV."
5189 -- Insert section 6.X "Path Object Queries" after 6.1.18 "Renderbuffer
5192 6.X. Path Rendering Queries
5194 6.X.1. Path Object Parameter Queries
5198 void GetPathParameterivNV(uint path, enum pname, int *value);
5199 void GetPathParameterfvNV(uint path, enum pname, float *value);
5201 obtains the current value of the /param/ path parameter of the path
5203 /name/ is not an existing path object. /value/ is a pointer to a
5212 PATH_COMMAND_COUNT_NV int Length of the path's
5214 PATH_COORD_COUNT_NV int Length of the path's
5216 PATH_DASH_ARRAY_COUNT_NV int Length of the path's
5218 PATH_COMPUTED_LENGTH_NV float Computed path-space
5220 segments in the path
5222 PATH_OBJECT_BOUNDING_BOX_NV 4*float tight path-space bounding
5223 box around the path's
5225 PATH_FILL_BOUNDING_BOX_NV 4*float Conservative path-space
5227 path's covered fill region
5228 PATH_STROKE_BOUNDING_BOX_NV 4*float Conservative path-space
5230 path's covered stroke region
5239 the minimum (x1,y1) corner of the respective path-space bounding
5240 box and the maximum (x2,y2) corner of the respective path-space
5247 tightly the region of path space containing the path's outline.
5251 PATH_FILL_BOUNDING_BOX_NV bounding boxes of a path object, a point at
5253 be within the filled outline of the path.
5258 a path object, a point at (x,y) such that x<x1 or x>x2 or y<y1 or
5259 y>y2 is guaranteed to /not/ be within the stroked region of the path.
5261 6.X.2. Path Object Varying Arrays Queries
5263 Path objects support a variable number of commands, coordinates,
5268 void GetPathCommandsNV(uint path, ubyte *commands);
5270 returns the sequence of commands within the path object named /name/
5272 generated if /name/ is not an existing path object. The number of
5273 commands returned is identical to the value of the path object's
5277 Any path commands specified with a character alias value (from Table
5282 void GetPathCoordsNV(uint path, float *coords);
5284 returns the sequence of coordinates within the path object named
5286 is generated if /name/ is not an existing path object. The number
5287 of commands returned is identical to the value of the path object's
5297 void GetPathDashArrayNV(uint path, float *dashArray);
5299 returns the sequence of dash lengths within the path object named
5301 generated if /name/ is not an existing path object. The number of
5302 dash lengths returned is identical to the value of the path object's
5306 6.X.3. Path Object Glyph Typographic Queries
5319 queries glyph metrics associated with a sequence of path objects
5321 parameters. Metrics are associated with path objects specified by
5340 returned metrics for a given path object. If /stride/ is negative
5353 For path objects not created with either PathGlyphsNV or
5356 This metric information for a path object is /not/ updated if
5357 the commands or coordinates or parameters of that path object are
5411 Bit field name metric tag in bitmask Description (units in path space)
5427 Bit field name in bitmask Description (units in path space)
5439 FONT_UNITS_PER_EM_BIT_NV 20 Number of units in path space (font units) per
5506 returns a sequence of /numPaths/-1 glyph spacing vectors in path
5507 space for spacing the specified sequence of path object pairs.
5564 The getPathName function is found in section 5.X.2.3 (Instanced Path
5569 The advance function returns the hAdvance metric of path object
5570 name passed to the function, but if the path object lacks glyph
5571 metrics, the difference between the horizontal bounds of the path
5573 are returned instead. If the named path object passed to advance
5578 (typically left) and second (typically right) path objects if they
5581 named path object does not exist, zero is returned for kerningY.
5583 metrics are false for the first path object name, kerningX and
5586 Spacing information (horizontal advance or kerning) in a path object
5587 is not changed if the path's commands, coordinates, or parameters
5589 determined by the first path's object bounding box.
5591 6.X.4. Path Object Geometric Queries
5595 boolean IsPointInFillPathNV(uint path,
5598 computes the winding number of the path-space 2D (x,y) point given
5599 by /x/ and /y/ with respect to the path object named /path/ and
5602 substitute the path object's PATH_FILL_MASK_NV parameter value
5604 generated if /path/ does not exist.
5606 This point-inside computation occurs in /path space/ rather than in
5611 boolean IsPointInStrokePathNV(uint path,
5614 returns TRUE if the path-space 2D (x,y) point given by /x/ and
5615 /y/ is within the stroked region of the path object named /path/;
5617 generated if /path/ does not exist.
5619 The stroked region's stroke width is specified by the path object's
5622 The stroked region is defined as in section 5.X.2.1 ("Path
5623 Stenciling") so accounts for the path object's current end cap,
5626 This point-inside computation occurs in /path space/ rather than in
5631 float GetPathLengthNV(uint path,
5635 of a path object named /path/. The portion of the path measured is
5637 The returned length is measured in path-space units. The error
5638 INVALID_OPERATION is generated if /path/ does not exist.
5640 The geometric length of the path's measured portion depends only
5641 on the path's commands and associated coordinates for the indicated
5643 The geometric length of the path does not, for example, depend on
5644 the path's dashing parameters.
5647 units to the computed geometric length. For all other path commands,
5648 a path segment's geometric length contribution /s/ is:
5656 respective path segment parametric function found in Table
5672 the final path segment.
5678 value of /path/'s PATH_COMMAND_COUNT_NV parameter and no error
5681 /path/'s PATH_COMPUTED_LENGTH_NV parameter.
5685 boolean PointAlongPathNV(uint path,
5692 path object specified by /path/ and the unit-length tangent vector
5703 subpath consisting of the /numSegments/ path segments beginning with
5704 /startSegment/ (where the initial path segment has index 0) is used.
5708 of the path is used (and the query returns FALSE). If /distance/
5709 is greater than the path length (i.e., the value returned when the
5714 The error INVALID_OPERATION is generated if /path/ does not exist.
5718 generated if /startSegment/ is greater than the index of /path/'s
5719 final path segment. The error INVALID_VALUE is generated if
5721 the index of /path/'s final path segment.
5724 a path, an implementation is not required to use exact computation
5730 monotonically along the path.
5732 Implementations should use the same distance-along-a-path algorithm
5733 for PointAlongPathNV as is used for dashing a stroked path. (The dash
5734 count and dashing array state of the path object is irrelevant to
5741 6.X.5. Path Color and Texture Coordinate Generation Queries
5748 return path color generation state. /color/ must be one of
5755 color's path generation mode is written to the value referenced by
5759 respective color's path generation color format is written to the
5763 color's path generation are written to the array referenced by the
5765 are written no matter what the path color generation mode is though
5766 coefficients not accessed by the indicated path color generation
5774 return path texture coordinate set generation state. /texCoordSet/
5782 texture coordinate set's path generation mode is written to the
5786 respective texture coordinate set's path generation number of
5790 texture coordinate set's path generation are written to the array
5792 coefficients are written no matter what the path texture generation
5793 mode is though coefficients not accessed by the indicated path
5798 Path objects are shared between AGL/GLX/WGL rendering contexts if
5802 Changes to path objects shared between multiple rendering contexts
5927 to query associated path modelview and projection state.
5929 The values of sc, tc, rc, and qc discussed in section 5.X.2.2 "Path
5935 -- NEW table 6.X, "Path (state per context)" following Table 6.33, "Renderbuffer"
5939 PATH_GEN_MODE_NV 2xZ4 GetPathColorGenivNV NONE path's color 6.X.5 lighting
5941 PATH_GEN_COLOR_FORMAT_NV 2xZ6 GetPathColorGenivNV NONE path's color 6.X.5 lighting
5943 PATH_GEN_COEFF_NV 2x16xR GetPathColorGenfvNV all 0's path's color gen mode 6.X.5 lighting
5945 PATH_GEN_MODE_NV nxZ4 GetPathTexGenivNV NONE path's texture 6.X.5 texture
5947 PATH_GEN_COMPONENTS_NV nxZ5 GetPathTexGenivNV 0 path's texture 6.X.5 texture
5950 PATH_GEN_COEFF_NV nx16xR GetPathTexGenfvNV all 0's path's texture 6.X.5 texture
5952 PATH_FOG_GEN_MODE_NV Z2 GetIntegerv FRAGMENT_DEPTH path's fog generation 5.X.2.1 fog
5954 PATH_ERROR_POSITION_NV Z GetIntegerv -1 last path string 5.X.1.2 -
5956 PATH_STENCIL_FUNC_NV Z8 GetIntegerv ALWAYS path stenciling function 5.X.2.1 stencil-buffer
5957 PATH_STENCIL_REF_NV Z+ GetIntegerv 0 path stenciling 5.X.2.1 stencil-buffer
5959 PATH_STENCIL_VALUE_MASK_NV Z+ GetIntegerv 1's path stencil read mask 5.X.2.1 stencil-buffer
5960 PATH_STENCIL_DEPTH_OFFSET_FACTOR_NV R GetFloatv 0 path stencil depth 5.X.2.1 polygon
5962 PATH_STENCIL_DEPTH_OFFSET_UNITS_NV R GetFloatv 0 path stencil depth 5.X.2.1 polygon
5964 PATH_COVER_DEPTH_FUNC_NV Z8 GetIntegerv LESS path covering depth 5.X.2.2 depth-buffer
5970 -- NEW table 6.Y, "Path (state per path object)" following Table 6.X
5974 - nxZ8* GetPathCommandsNV - path's sequence of path commands 6.X.1 -
5975 - mxR GetPathCoordsNV - path's sequence of path 6.X.1 -
5978 PATH_COMMAND_COUNT_NV Z+ GetPathParameterivNV - path's count of path commands 6.X.1 -
5979 PATH_COORD_COUNT_NV Z+ GetPathParameterivNV - path's count of path coordinates 6.X.1 -
5980 PATH_COMPUTED_LENGTH_NV R+ GetPathParameterfvNV - GL's calculation of the path's 6.X.1 -
5983 PATH_INITIAL_END_CAP_NV Z4 GetPathParameterivNV FLAT path's initial end cap style 5.X.1.5 -
5984 PATH_TERMINAL_END_CAP_NV Z4 GetPathParameterivNV FLAT path's terminal end cap style 5.X.1.5 -
5985 PATH_JOIN_STYLE_NV Z4 GetPathParameterivNV MITER_REVERT_NV path's join style 5.X.1.5 -
5986 PATH_MITER_LIMIT_NV R+ GetPathParameterfvNV 4 path's miter limit 5.X.1.5 -
5987 PATH_DASH_ARRAY_COUNT_NV Z+ GetPathParameterivNV 0 path's count of dashes in the 5.X.1.5 -
5988 path's dash array 5.X.1.5 -
5989 PATH_DASH_OFFSET_NV R GetPathParameterfvNV 0.0 path's dash offset 5.X.1.5 -
5990 PATH_DASH_OFFSET_RESET_NV Z2 GetPathParameterivNV MOVE_TO_CONTINUES_NV path's dash offset reset 5.X.1.5 -
5992 of the path's length
5993 PATH_INITIAL_DASH_CAP_NV Z4 GetPathParameterivNV FLAT path's initial dash cap style 5.X.1.5 -
5994 PATH_TERMINAL_DASH_CAP_NV Z4 GetPathParameterivNV FLAT path's terminal dash cap style 5.X.1.5 -
5995 PATH_FILL_MODE_NV Z3 GetPathParameterivNV COUNT_UP_NV path's default fill mode 5.X.1.5 -
5996 PATH_FILL_MASK_NV Z+ GetPathParameterivNV all 1's path's default fill mask 5.X.1.5 -
5997 PATH_FILL_COVER_MODE_NV Z4 GetPathParameterivNV CONVEX_HULL_NV path's default fill cover mode 5.X.1.5 -
5998 PATH_STROKE_COVER_MODE_NV Z4 GetPathParameterivNV CONVEX_HULL_NV path's default stroke cover mode 5.X.1.5 -
5999 PATH_STROKE_MASK_NV Z+ GetPathParameterivNV all 1's path's default stroke mask 5.X.1.5 -
6000 PATH_STROKE_BOUND_NV R[0,1] GetPathParameterfvNV 0.2 (20%) path's stroke approximation 5.X.1.5 -
6002 PATH_OBJECT_BOUNDING_BOX_NV R4 GetPathParameterfvNV - path's outline bounding box 6.X.1 -
6003 PATH_FILL_BOUNDING_BOX_NV R4 GetPathParameterfvNV - path's fill bounding box 6.X.1 -
6004 PATH_STROKE_BOUNDING_BOX_NV R4 GetPathParameterfvNV - path's stroke bounding box 6.X.1 -
6006 where n is the number of commands in a path object, m is the number
6007 of coordinates in a path object, and c is the dash array count of
6008 a path object.
6010 -- NEW table 6.Z, "Path Glyph Metrics (state per path object)" following Table 6.Z
6014 GLYPH_WIDTH_BIT_NV R GetPathMetricsNV see 5.X.1.3 path's glyph width 6.X.3 -
6015 GLYPH_HEIGHT_BIT_NV R GetPathMetricsNV see 5.X.1.3 path's glyph height 6.X.3 -
6016 GLYPH_HORIZONTAL_BEARING_X_BIT_NV R GetPathMetricsNV see 5.X.1.3 path's glyph left side bearing 6.X.3 -
6018 GLYPH_HORIZONTAL_BEARING_Y_BIT_NV R GetPathMetricsNV see 5.X.1.3 path's glyph top side bearing 6.X.3 -
6020 GLYPH_HORIZONTAL_BEARING_ADVANCE_BIT_NV R GetPathMetricsNV see 5.X.1.3 path's glyph advance width 6.X.3 -
6022 GLYPH_VERTICAL_BEARING_X_BIT_NV R GetPathMetricsNV see 5.X.1.3 path's glyph left side bearing 6.X.3 -
6024 GLYPH_VERTICAL_BEARING_Y_BIT_NV R GetPathMetricsNV see 5.X.1.3 path's glyph top side bearing 6.X.3 -
6026 GLYPH_VERTICAL_BEARING_ADVANCE_BIT_NV R GetPathMetricsNV see 5.X.1.3 path's glyph advance width 6.X.3 -
6031 -- NEW table 6.W, "Path Font Metrics (state per path object though identical for glyphs from the same font face)" following Table 6.Z
6035 FONT_X_MIN_BOUNDS_BIT_NV R GetPathMetricsNV see 5.X.1.3 path's horizontal minimum (left-most) 6.X.3 -
6037 FONT_Y_MIN_BOUNDS_BIT_NV R GetPathMetricsNV see 5.X.1.3 path's vertical minimum (bottom-most) 6.X.3 -
6039 FONT_X_MAX_BOUNDS_BIT_NV R GetPathMetricsNV see 5.X.1.3 path's horizontal maximum (right-most) 6.X.3 -
6041 FONT_Y_MAX_BOUNDS_BIT_NV R GetPathMetricsNV see 5.X.1.3 path's vertical maximum (top-most) 6.X.3 -
6043 FONT_UNITS_PER_EM_BIT_NV R GetPathMetricsNV see 5.X.1.3 path's number of units in path space 6.X.3 -
6046 FONT_ASCENDER_BIT_NV R GetPathMetricsNV see 5.X.1.3 path's typographical ascender (in font 6.X.3 -
6048 FONT_DESCENDER_BIT_NV R GetPathMetricsNV see 5.X.1.3 path's typographical descender (in font 6.X.3 -
6050 FONT_HEIGHT_BIT_NV R+ GetPathMetricsNV see 5.X.1.3 path's font face vertical distance 6.X.3 -
6053 FONT_MAX_ADVANCE_WIDTH_BIT_NV R GetPathMetricsNV see 5.X.1.3 path's maximal advance width (in font 6.X.3 -
6055 FONT_MAX_ADVANCE_HEIGHT_BIT_NV R GetPathMetricsNV see 5.X.1.3 path's maximal advance height (in font 6.X.3 -
6058 FONT_UNDERLINE_POSITION_BIT_NV R GetPathMetricsNV see 5.X.1.3 path's position (in font units) of the 6.X.3 -
6075 PATH_GEN_MODE_NV Z4 GetProgramResourceiv NONE Path fragment input generation mode
6076 PATH_GEN_COMPONENTS_NV Z5 GetProgramResourceiv 0 Number of path fragment input components
6077 PATH_GEN_COEFF_NV 16*R GetProgramResourceiv all zeros Path fragment input generation coefficients
6091 Follow-on release (circa September 2011) adds these path
6099 These path commands are not operational (generate GL_INVALID_ENUM
6125 void glStencilThenCoverFillPathNV(GLuint path, GLenum fillMode,
6127 void glStencilThenCoverStrokePathNV(GLuint path, GLint reference,
6178 These new path commands:
6184 New path glyph metric query:
6188 New return values from glyph index path specification commands:
6211 New glyph index path specification commands:
6251 path rendering stencil and cover operations on NVIDIA Fermi- and
6255 modifying a path object prior to stenciling or covering the paths.
6259 Due to NVIDIA driver bug 1315267, path objects were not actually
6269 and stroked paths, hence "path rendering".
6271 "path" alone was considered but deemed to vague.
6277 There are several problems solved by including first-class path
6281 all path rendering systems. Not including glyph support will force
6282 all path rendering applications to build their own glyph system.
6296 could only actually load queried and used path objects.
6308 and stroke path objects?
6312 The two-pass decoupling of path rendering into stenciling and
6320 without conflating the path's coverage determination with
6323 1a) If shading resources are used to implement the path coverage
6331 3) Path rendering standards all allow a rendered path to be clipped
6332 by another arbitrary (clipping) path. This can even be
6336 stenciled stencil steps. Otherwise clipping a path to another
6337 path is a complex intersection and re-tessellation task.
6341 only visited once per path rendering as path rendering
6355 accomplish. You can stroke a path with a stroke width of 7.5
6358 stroked path with a stroke width of 7.5 and accomplish the
6365 Silverlight's path syntax is very similar to SVG but allows
6370 of a path outline. This is a binary, rather than textual,
6375 format for arbitrary path descriptions. This extension already
6377 specifying path objects from font glyphs. And the font hinting
6380 5. Should there be a query to return a path as a string?
6387 way to build a string for a given path.
6393 6. Should path rendering allow per-vertex specification of attributes?
6400 make sense in the context of path rendering. Instead a mechanism
6410 generating by covering a filled or stroked path.
6415 path rendering. Paths do not really have vertices but rather
6418 7. Should path rendering use the existing texture coordinate
6421 RESOLVED: No, this extension should have its own path-specific
6427 path rendering (since there are no per-vertex normals).
6432 for path rendering. This means the vertex processing program
6433 needed for path rendering isn't changed by state updates intended
6436 8. How does path rendering work if all the fixed-function state,
6446 matrices combine to transform the path into clip space.
6447 Without these matrices, there's no way to get the path
6465 step of path rendering without reference to fixed-function
6472 covering path access fragment varyings?
6493 path descriptions coded with C character arrays (strings) such
6500 exact analogues in the SVG path command syntax.
6505 Unfortunately the path command token values do NOT match the
6506 SVGPathSeg interface path segment type values because these
6556 15. Why is the horizontal kerning information for a pair of path
6576 16. Should the path name zero be treated specially?
6579 name for a path object.
6592 18. Should two-sided color be supported for path rendering?
6594 RESOLVED: No. No path rendering standards support this concept.
6599 19. How do PostScript's user path operators correspond to
6600 NV_path_rendering's path command tokens?
6604 PostScript path
6605 operator Path command token
6621 box for the current path, within which the coordinates of all
6622 subsequent path construction operators must fall." There is
6627 interpreter that the enclosing user path is to be retained in
6628 the cache if the path is not already there." This notion that
6630 applicable to this extension because all path object are in
6636 path command tokens?
6640 OpenVG path
6641 segment command Path command token
6695 UNRESOLVED: Silverlight 3.0's path markup syntax includes
6696 support for two extensions of the SVG 1.1 path grammar: 1)
6705 simply allow the path object's GL_PATH_FILL_MODE_NV parameter to
6706 be specified as part of the path string specification. The "F0"
6707 or "F1" would not be treated as an actual path command however.
6712 path with the Silverlight format would have a different initial
6717 values for the coordinate values of a path object? Infinite is
6723 command (and hence coordinates) in a path object?
6725 RESOLVED: No. The standards for path rendering do no generally
6726 have limits on path command lengths.
6730 not simply the specification of a huge path.
6734 RESOLVED: No. The standards for path rendering do not generally
6738 with path rendering?
6745 TO A TRANSFORMED PATH" subsection of section 5.X.2.1).
6748 cap region to a stroked path?
6819 33. Why are the binary encodings for the path commands in the PS
6847 RESOLVED: These queries for path commands, coordinates, and
6848 the path's dash array return a variable payload of data so are
6872 35. How should the GL_PATH_*_BOUNDING_BOX_NV path parameters be
6898 GPU-accelerated path rendering that INCLUDES excellent support
6901 The fact is all the major existing standards for path rendering
6971 38. What is the path rendering philosophy for this extension?
6974 support for the accepted functionality of path rendering.
6977 stencil-based approach to GPU-accelerating path rendering.
6983 (non-circular) arcs path segments are assumed to be approximated
6984 by a sequence of quadratic Bezier path segments that guarantee
6988 based on tessellation of path outlines.
6991 This broadly allows path content from TrueType (based on quadratic
7003 The path queries support the key path queries supported by OpenVG.
7005 39. Should there be an API for assigning path metric information to
7006 a path object?
7010 Path metrics are available when a path object is created with
7012 supplies the metric data for these path objects.
7015 arbitrary path object. This way user-defined path objects could
7019 Supporting the specification of path metrics would require new
7027 (unlike other path parameters), it seems odd to allow information
7033 40. What happens when an input path object to glWeightPathsNV,
7035 or more path objects involved?
7043 glCopyPathNV copies outlines for path objects containing any
7046 41. When a path object is created from other existing path objects
7048 commands, where does the new path's parameters come from?
7050 RESOLVED: While the path commands are interpolated on a
7051 command-by-command basis with these commands, the path parameters
7052 should be copied from the first path object specified.
7055 the path parameters from the path[0], pathA, and srcPath
7059 a path object created from other existing path objects through the
7061 where does the new path's parameters come from?
7063 RESOLVED: The path metric information is set to negative one
7069 More explicitly, the path metric information from the first path
7073 information (since only one path object is involved so there's
7078 a path?
7082 Existing path rendering standards keep the stroking parameters
7083 constant for a given path's outline. For example, there's not
7085 non-dashed stroked segment with width 9.4 in the same path.
7089 sequence. However it would complicate the meaning of the path
7094 immediately (mid path?) or not latch until the next "moveto"
7097 Attempting to support changing stroking parameters within a path
7102 path object, each with the appropriate stroking parameters for
7103 the appropriate path segments.
7105 44. What should the query token for the path color and texture
7116 path color and texture coordinate generation coefficients depend
7117 on the current path color or texture coordinate generation mode or
7125 on the respective current path generation mode. It is better
7153 49. How should fog coordinate generation work for path rendering?
7156 of the fog coordinate operates for path rendering commands.
7164 with conventional vertex processing and path vertex processing,
7168 The fog coordinate generation for path rendering can either
7169 use the fog coordinate "as is" for the entire covered path or
7173 50. What should glyph metrics return for path objects not specified
7179 negative values provide a reliable indicator that a path object
7182 51. How should the fill mode state of path objects created from
7185 RESOLVED: The initial GL_PATH_FILL_MODE_NV for path objects
7197 52. Should other path object parameters other than the fill mode be
7198 initialized specially when path objects are specified from glyphs?
7202 In theory, other path parameters such as stroke width, join style,
7208 a path object is unclear. The availability of these parameters
7245 appearance of a path object by rendering the individual multiple
7248 application could create its own custom path object in this
7275 55. Are relative path commands converted to absolute commands upon
7276 path specification?
7282 interpolating, or weighting existing path objects. Relative path
7283 commands must match identical relative path commands and their
7296 In other words, if a path object is modified or edited, the
7297 outline of the path is the same as if the path object had been
7304 RESOLVED: When a path object is specified from the glyph of a
7305 font, the path object's outline is specified from the "ideal"
7308 This is because a path object is rendered (stenciled or covered)
7316 In TrueType terms, this amounts to the path object's outline for
7325 Then this fitted outline could be specified for a path object.
7345 58. How is antialiasing of path object rendering accomplished?
7348 will be accomplished when rendering path objects.
7352 by stenciling path objects should be accurate to the sample
7357 path with respect to that pixel, assuming a single "stencil, then
7375 does it even attempt, to compute or approximate a path's area
7380 Point sampling of path object rasterization can offer more
7386 The implication of this observation is path rendered content can
7389 mix path rendered and 3D rendered content in the same framebuffer
7392 Keep in mind that 2D path rendered content is transformed by the
7394 rendering primitives, so fragments generated with path rendering
7417 Alternatively, a path object itself needing extra antialiasing,
7418 perhaps because the application has determined the path object
7427 be several times faster than CPU path rendering methods because
7430 59. How do the multisample fragment operations interact with path
7433 RESOLVED: They are ignored for the "stencil" path rendering
7435 work as specified for the "cover" path rendering operation.
7437 The coverage determination made during the "cover" path
7438 rendering operation doesn't reflect the path itself but rather
7442 or stenciled region of the path being covered. And exactly how
7456 respected for path rendering.
7458 60. Does creating multiple instances of path objects from the same
7463 to expect that copies of path objects created with glCopyPathNV
7465 true even if a path object is copied and its path parameters
7466 are modified (but not the path commands and coordinates).
7468 It is also reasonable to expect that path objects created with
7476 glPathSubCoordsNV to modify the path commands and/or coordinate
7480 not disturb path objects that already exist in the range of path
7497 This ensures that path object names /firstPathName/ through
7505 62. Why are the angles for the arc path commands specified with
7513 path commands are based.
7520 63. Should UTF-8 and UTF-16 be supported for arrays of path names?
7525 path objects with typed elements and a base are specified?
7556 path objects is specified?
7584 path's bounding boxes. (This can be too conservative for an
7585 arbitrarily arranged collection of path objects but works well
7589 order no matter what path objects are listed. This property
7661 exceeds 360 [degrees], the resulting path will trace portions
7680 This paragraph in Section 5.X.1 ("Path Specification") applies
7733 Probably need to check what other path renders, particularly
7737 73. Why have the GL_PATH_CLIENT_LENGTH_NV path parameter?
7740 calibrate distance-along-a-path computations.
7748 for a path may greatly affect the dashing pattern. The client
7749 knows the path's client length, but the GL doesn't unless the
7750 client state is available to the GL when dashing a stroked path.
7752 It's better to have the client send the client path length
7754 path length ahead of any sending of a rescaled version of the
7769 for most path rendering systems that have identical initial
7773 75. What should the path format tokens for SVG and PostScript tokens
7795 the end of an existing path object?
7799 to the number of path commands in the path object suffices),
7803 "stencil" and "cover" path operations?
7807 The "stencil" path operations use the
7813 The "cover" path operations use the polygon depth offset state if
7819 Depth offset is useful when a path rendered decal is applied
7820 on depth tested 3D geometry and the path rendered geometry has
7824 This is also useful when putting path rendered primitives into
7830 "cover" operation given identical path object and transformations.
7842 In cases where the path rendered primitive is "very edge" on the
7845 80. When are various computed path parameters re-computed?
7852 always reflect the most up-to-date state of the path object.
7854 This also includes when path object parameters are used in
7857 81. Should projective 2D path coordinates be supported?
7859 RESOLVED: No. Major path rendering standards don't support
7860 projective 2D path coordinates.
7862 Moreover, projective 2D path coordinates create technical
7864 2D path coordinates for cubic Bezier curves do not necessarily
7867 82. Should a non-dashed stroked path's coverage be the same
7881 83. Should character aliases used to specify path commands be returned
7885 RESOLVED: Remapped. Any path commands specified with a
7915 // M STENCIL+COVER PASSES to accumulate jittered path coverage into framebuffer's alpha channel
7916 glStencilFillPathNV(path, GL_COUNT_UP_NV, 0x7F);
7917 glCoverFillPathNV(path, GL_PATH_FILL_COVER_MODE_NV);
7927 glStencilFillPathNV(path, GL_COUNT_UP_NV, 0x7F);
7928 glCoverFillPathNV(path, GL_PATH_FILL_COVER_MODE_NV);
7940 GL_UNSIGNED_BYTE, "\0\0\0\0", // tricky: draw path objects path+0,path+0,path+0,path+0
7941 path, // this is that path object that is added to zero four times
7949 contiguous ranges of path objects instead of returning an array of
7952 RESOLVED: The expectation that path objects will be arranged
7959 86. What do the stencil and cover commands do if the specified path
7960 name does not refer to an existing path object?
7964 This is useful to avoid rendering unpopulated path objects.
7972 path objects can use glCopyPathNV to copy some existing path
7976 (or sequence) of path objects with a standard missing glyph
7979 Queries (glGetPathParameteriv, etc.) allowing only a single path
7981 if the path name does not exist.
7987 Path commands that modify the commands, coordinates, or parameters
7988 of existing path objects (as opposed to specifying a path object
7989 completely) generate a GL_INVALID_OPERATION error if the path
7996 "Path (state per context)".
7998 The path fog generation mode applies to GL_FOG_BIT.
8000 The path color generation mode and coefficients apply to
8003 The path texture coordinate set generation modes and coefficients
8006 The path error position is not pushed or popped, following the
8009 88. How should the numCoords parameter to the various path
8015 the command's specified path command sequence. This provides
8019 the range of coordinates "match up" with path command boundaries
8024 be based on the command's corresponding path command sequence.
8026 the application didn't exactly know how many coordinates a path
8029 a display list or packed into GLX protocol, the path command
8031 GL client unnecessarily knowledgeable about the supported path
8034 it means that the path command sequence really is expected to
8042 target populates the entire sequence or range of path objects
8058 RESOLVED: The "Missing" font name populates these with a path
8066 glPathGlyphsNV don't re-specify existing path objects, these
8068 font used to specify a given range of path objects. All white
8096 to be used. Be careful because outlines of path objects for
8100 92. Should glWeightPathsNV work for a single path object?
8103 weighted path.
8105 Use glCopyPathNV if copying a single path object is desired.
8113 94. What should the initial join style of a path object be?
8148 glPathGlyphRangeNV would never populate path object names with
8171 will fail to populate the range of path objects from
8177 applications can still utilize fonts in their path rendering.
8188 within a path's command sequence.
8191 GL_DASH_OFFSET_RESET_NV path parameter takes an enumeration
8202 value of the path's GL_DASH_OFFSET_NV parameter (consistent with
8221 RESOLVED: Sometimes a path should be stroked with a stroke width
8229 the path object into the appropriate space so that the user-space
8259 column is not consequential to the resulting transformed path.
8275 102. What happens if a command that creates a path from existing path
8276 objects has the result path name as one of the inputs?
8278 RESOLVED: This is expected to just work. The new path object
8279 is created from the existing ones, then the new path object
8280 replaces any path object with the resulting path object name.
8285 in path commands transitioning from non-rational to rational
8288 If points on the path boundary are generated by non-rational
8293 104. Should there be a distinct stencil function state for path
8297 stencil state needs to be configured for path covering is
8299 for path stenciling.
8302 glStencilFunc(GL_NOT_EQUAL,0,~0) while path stenciling would
8303 use GL_ALWAYS for the path stenciling stencil test.
8305 However there are other situations such as path clipping where it
8306 is useful to have the path stencil function configured differently
8308 similar path clipping test.
8310 105. Is there back- and front-facing path stencil function state?
8313 value, and read mask. The path stenciling operation doesn't
8316 106. Does the path stencil function state apply always or only if
8320 from this test, use the GL_ALWAYS path stencil function (which
8324 the stencil test during path cover operations?
8326 RESOLVED: NO, the path stencil state updated by
8327 glPathStencilFuncNV only affects the path stencil (not cover)
8330 For the path cover operations, the *normal* stencil test applies.
8331 For the stencil test to apply to path cover operations, the
8334 108. Should path objects be shared among rendering contexts in the
8341 Because path objects are not "bound" there are stricter
8345 Due to NVIDIA driver bug 1315267, path objects were not actually
8373 110. What is the initial miter limit of a path object?
8380 path rendering APIs. The SVG initial miter limit is chosen
8395 111. Should initial path object state such as miter limit, stroke width, etc.
8401 Possibly. That would make it easier for a particular path
8403 to initialize path object parameters.
8410 Providing -ze/we would not interpolate properly over the path.
8419 113. How should path color and texture coordinate generation be
8434 Querying the respective coefficients after path color or texture
8437 114. How should path color and texture coordinate generation interact
8445 sequence of glyph path objects where the line of text should share
8475 RESOLVED: Path object specified from glyphs often need parameters
8477 path object parameters in table 6.Y.
8479 Rather than force an application to respecify the path parameters
8480 of all the path objects in a range of path objects for glyphs,
8481 it is more efficient for such glyph-initialized path objects
8482 to simply use parameters from another existing path object as
8486 respecified for every path object corresponding to a range of
8496 A shared dash pattern for all path objects belonging to a single
8497 set of glyphs is much easier to specify from a template path
8514 to depth test path rendering consisting of several co-planar
8515 path layers (as is typical of path rendering content) against
8518 To properly depth test path rendering against conventional 3D
8519 rendering and other path rendering, particularly when a set of
8522 This avoids Z-fighting when drawing path rendered layers that
8527 To depth-test path rendered content in this manner, follow the
8532 // Conventional initialization for depth testing and using path rendering
8537 // The additional calls for depth testing of path-rendering...
8538 glPathStencilDepthOffsetNV(-0.05, -1); // push stenciled path depth values slightly closer
8548 For each rendered path object...
8566 enabled to draw prior path rendered objects).
8574 With this pattern, conventional and path rendered objects can
8577 The above pattern shows path filling, but path stroking works
8582 actually "different" than conventional 3D or path rendering.
8586 path rendering content may be judged to pass the depth test when
8588 This is because the path stencil depth offset is pushing path
8592 the path rendering are so close.
8599 a planar conservative bounding region for the path object into
8604 Then path rendering, with depth testing DISABLED, can use
8610 values for the path rendering.
8612 122. How should the path stencil depth offset be described?
8619 offset isn't appropriate in the context of path rendering because
8625 There's no perfect attribute category of state for path stencil
8629 123. Does glPointAlongPathNV have anything to do with the path's
8635 computes the arc length along the path (really a subpath) but
8642 124. Should PostScript user path parser enforce the same error
8647 Section 4.6.1 (User Path Construction) in the PostScript Language
8651 is optional but must be the first operator in a user path.
8655 The grammar in 5.X.1.2.2 (PostScript Path Grammar) does not
8660 parser easier to specify, 2) make the specification of a path
8661 object through a PostScript path grammar more consistent with
8662 specifying a path using glPathCommandsNV, and 3) not require
8663 specification of a user path bounding box that isn't relevant
8666 If a path command is used without a prior absolute positioning
8670 125. The ISO PDF 32000 standard has additional path construction
8673 first-class path commands for these operators?
8676 to the path commands GL_DUP_FIRST_CUBIC_CURVE_TO_NV,
8680 See Table 59 (Path Construction Operators) in the PDF 32000-1:2008
8686 These additional operators make path specification and storage
8698 126. What is the GL_RESTART_PATH_NV path command for?
8700 RESOLVED: It is useful to be able to concatenate path
8703 path command processing back to its initial state when the first
8704 command of a path's command sequence is processed.
8706 So you could use glPathSubCommandsNV to append a path sequence
8707 to an existing path object's sequence. By first appending a
8709 with drawing the path sequences independently.
8712 a GL_RESTART_PATH_NV path command is encountered.
8724 offset, but if the path's GL_PATH_DASH_OFFSET_RESET_NV is set
8738 in an aliased appearance for the determined path coverage so
8758 129. What happens when a command or query takes a sequence of path object
8759 names and a named path object does not exist?
8761 RESOLVED: The non-existent path is "skipped" in instanced
8763 for the particular path name is skipped over). Notice the
8764 pseudo-code for these instanced path commands uses glIsPathNV
8765 to test if each path name exists.
8771 path objects (as also occurs if the path object lacks metrics
8774 No GL error is generated due to a non-existent path name.
8806 RESOLVED: Add a new command to specify the path fragment
8809 back the path fragment input generation state.
8816 The new GL_FRAGMENT_INPUT_NV token names the path fragment input
8821 path fragment input generation resources.
8840 134. Existing path rendering systems typically specify 2D transforms.
8847 representations to accelerate path rendering where often matrix
8853 This table shows the correspondence between other path rendering
8855 the range of matrix representations used by major path rendering
8968 "GPU-accelerated Path Rendering":
8982 The GL_CONIC_CURVE_TO_NV and GL_RELATIVE_CONIC_CURVE_TO_NV path
8983 commands take five path coordinates:
8989 path commands. The fifth coordinate "w" is a homogeneous coordinate
8992 Skia parameterizes its SkPath::kConic_Verb conic curve path
9005 See Table 5.pathEquations (Path Equations) for the specific
9007 and GL_RELATIVE_CONIC_CURVE_TO_NV path commands.
9009 The GL_RELATIVE_CONIC_CURVE_TO_NV path command is not supported
9011 general-purpose path commands should have relative versions.
9014 path command is non-positive?
9016 RESOLVED: Match Skia's behavior and treat the path command as
9036 146. Should there be a rational cubic path command?
9041 when transformed projectively (as is possible when a path is
9055 specification of the same path with multiple line and arc (or
9081 150. Should the "stencil" and "cover" path operations be combined
9094 on a path followed immediately by a "cover" command on the same
9095 path.
9134 152. Should glPathGlyphIndexRangeNV take the range of path objects
9135 as a parameter or return the base & count of path names created
9139 to first get an unassigned range of path object names based on
9141 the path object for every glyph index.
9145 whether and, if not why not, the path objects for the glyphs
9182 a bitmap font or otherwise isn't suitable for providing path
9219 path objects specified by glPathMemoryGlyphIndexArrayNV to be
9227 attempt to specify more path objects than the font supports
9230 RESOLVED: Path objects that would correspond to glyph indices
9237 No GL error is generated in this case. Also the path objects
9268 164. What path glyph specification commands support which font targets?
9286 RESOLVED: The path's stroke approximation bound helps the
9288 approximation error allowed when cubic Bezier path segments or
9309 path parameter provides such an intuitive limit expressed as a
9310 percentage of the path's stroke width.
9338 (sp) for the purposes of determining if the PostScript path
9359 number of path fragment input components.
9420 path generation of "gl_" prefixed built-in variables?
9463 11 09/10/13 mjk Add conic segment path commands
9474 FONT_NUM_GLYPH_INDICES_NV path query;