13 #ifndef OGLPLUS_EXT_NV_PATH_RENDERING_PATH_1203031902_HPP
14 #define OGLPLUS_EXT_NV_PATH_RENDERING_PATH_1203031902_HPP
16 #if OGLPLUS_DOCUMENTATION_ONLY || GL_NV_path_rendering
32 #if !OGLPLUS_NO_VARIADIC_TEMPLATES
52 static void Gen(tag::Generate, GLsizei count, GLuint* names)
54 assert(names !=
nullptr);
55 GLuint base = OGLPLUS_GLFUNC(GenPathsNV)(count);
56 for(GLsizei i=0; i!=count; ++i)
58 OGLPLUS_CHECK_SIMPLE(GenPathsNV);
61 static void Delete(GLsizei count, GLuint* names)
63 assert(names !=
nullptr);
64 OGLPLUS_GLFUNC(DeletePathsNV)(count, *names);
65 OGLPLUS_VERIFY_SIMPLE(DeletePathsNV);
68 static GLboolean IsA(GLuint name)
71 GLboolean result = OGLPLUS_GLFUNC(IsPathNV)(name);
72 OGLPLUS_VERIFY_SIMPLE(IsPathNV);
82 :
public ObjZeroOps<tag::DirectState, tag::PathNV>
92 template <
typename CoordType>
97 const CoordType* coords
100 OGLPLUS_GLFUNC(PathCommandsNV)(
103 (
const GLubyte*)commands,
105 GLenum(GetDataType<CoordType>()),
121 template <
typename CoordType>
123 const std::vector<PathNVCommand>& commands,
124 const std::vector<CoordType>& coords
127 OGLPLUS_GLFUNC(PathCommandsNV)(
129 GLsizei(commands.size()),
130 (
const GLubyte*)commands.data(),
131 GLsizei(coords.size()),
132 GLenum(GetDataType<CoordType>()),
133 (
const void*)coords.data()
143 #if OGLPLUS_DOCUMENTATION_ONLY || !OGLPLUS_NO_VARIADIC_TEMPLATES
151 template <
typename CoordType>
154 return Commands<CoordType>(spec._commands, spec._coords);
163 template <
typename CoordType>
166 OGLPLUS_GLFUNC(PathCoordsNV)(
169 GLenum(GetDataType<CoordType>()),
170 static_cast<const void*
>(coords)
185 template <
typename CoordType>
188 OGLPLUS_GLFUNC(PathCoordsNV)(
190 GLsizei(coords.size()),
191 GLenum(GetDataType<CoordType>()),
192 (
const void*)coords.data()
207 template <
typename CoordType>
209 GLsizei command_start,
210 GLsizei commands_to_delete,
211 GLsizei num_commands,
214 const CoordType* coords
217 OGLPLUS_GLFUNC(PathSubCommandsNV)(
222 (
const GLubyte*)commands,
224 GLenum(GetDataType<CoordType>()),
240 template <
typename CoordType>
242 GLsizei command_start,
243 GLsizei commands_to_delete,
244 const std::vector<PathNVCommand>& commands,
245 const std::vector<CoordType>& coords
248 OGLPLUS_GLFUNC(PathSubCommandsNV)(
252 GLsizei(commands.size()),
253 (
const GLubyte*)commands.data(),
254 GLsizei(coords.size()),
255 GLenum(GetDataType<CoordType>()),
256 (
const void*)coords.data()
266 #if OGLPLUS_DOCUMENTATION_ONLY || !OGLPLUS_NO_VARIADIC_TEMPLATES
272 template <
typename CoordType>
274 GLsizei command_start,
275 GLsizei commands_to_delete,
279 return SubCommands<CoordType>(
293 template <
typename CoordType>
297 const CoordType* coords
300 OGLPLUS_GLFUNC(PathSubCoordsNV)(
304 GLenum(GetDataType<CoordType>()),
305 static_cast<const void*
>(coords)
320 template <
typename CoordType>
323 const std::vector<CoordType>& coords
326 OGLPLUS_GLFUNC(PathSubCoordsNV)(
329 GLsizei(coords.size()),
330 GLenum(GetDataType<CoordType>()),
350 const GLchar* path_string
353 OGLPLUS_GLFUNC(PathStringNV)(
357 static_cast<const void*
>(path_string)
374 OGLPLUS_GLFUNC(PathStringNV)(
378 static_cast<const void*
>(path_string.
c_str())
443 GLboolean result = OGLPLUS_GLFUNC(IsPointInFillPathNV)(
453 return result == GL_TRUE;
463 GLboolean result = OGLPLUS_GLFUNC(IsPointInStrokePathNV)(
468 IsPointInStrokePathNV,
472 return result == GL_TRUE;
480 GLfloat
GetLength(GLsizei start_segment, GLsizei num_segments)
const
482 GLfloat result = OGLPLUS_GLFUNC(GetPathLengthNV)(
501 GLsizei start_segment,
502 GLsizei num_segments,
510 GLboolean result = OGLPLUS_GLFUNC(PointAlongPathNV)(
525 return result == GL_TRUE;
536 OGLPLUS_GLFUNC(PathParameterfNV)(
538 GL_PATH_STROKE_WIDTH_NV,
558 OGLPLUS_GLFUNC(GetPathParameterfvNV)(
560 GL_PATH_STROKE_WIDTH_NV,
564 GetPathParameterfvNV,
579 OGLPLUS_GLFUNC(PathParameterfNV)(
581 GL_PATH_MITER_LIMIT_NV,
601 OGLPLUS_GLFUNC(GetPathParameterfvNV)(
603 GL_PATH_MITER_LIMIT_NV,
607 GetPathParameterfvNV,
622 OGLPLUS_GLFUNC(PathParameterfNV)(
624 GL_PATH_JOIN_STYLE_NV,
643 OGLPLUS_GLFUNC(PathParameterfNV)(
645 GL_PATH_INITIAL_END_CAP_NV,
664 OGLPLUS_GLFUNC(PathParameterfNV)(
666 GL_PATH_TERMINAL_END_CAP_NV,
685 OGLPLUS_GLFUNC(PathParameterfNV)(
687 GL_PATH_INITIAL_DASH_CAP_NV,
706 OGLPLUS_GLFUNC(PathParameterfNV)(
708 GL_PATH_TERMINAL_DASH_CAP_NV,
727 OGLPLUS_GLFUNC(PathParameterfNV)(
729 GL_PATH_DASH_OFFSET_NV,
749 OGLPLUS_GLFUNC(GetPathParameterfvNV)(
751 GL_PATH_DASH_OFFSET_NV,
755 GetPathParameterfvNV,
770 OGLPLUS_GLFUNC(PathParameterfNV)(
772 GL_PATH_DASH_OFFSET_RESET_NV,
790 OGLPLUS_GLFUNC(PathDashArrayNV)(
803 #if OGLPLUS_DOCUMENTATION_ONLY || !OGLPLUS_NO_VARIADIC_TEMPLATES
809 template <
typename ...
T>
812 const std::size_t N =
sizeof ... (dashes);
813 const GLfloat dash_array[N] = { GLfloat(dashes)... };
814 return DashArray(N, dash_array);
826 OGLPLUS_GLFUNC(PathParameterfNV)(
828 GL_PATH_CLIENT_LENGTH_NV,
848 OGLPLUS_GLFUNC(GetPathParameterfvNV)(
850 GL_PATH_CLIENT_LENGTH_NV,
854 GetPathParameterfvNV,
869 OGLPLUS_GLFUNC(StencilFillPathNV)(
889 OGLPLUS_GLFUNC(CoverFillPathNV)(this->_name, GLenum(mode));
905 OGLPLUS_GLFUNC(StencilStrokePathNV)(
925 OGLPLUS_GLFUNC(CoverStrokePathNV)(this->_name, GLenum(mode));
944 OGLPLUS_GLFUNC(CopyPathNV)(
969 OGLPLUS_GLFUNC(InterpolatePathsNV)(
992 const GLfloat* transform_values
995 OGLPLUS_GLFUNC(TransformPathNV)(
998 GLenum(transform_type),
1012 typedef ObjectOps<tag::DirectState, tag::PathNV>
1023 #endif // NV_path_rendering
1025 #endif // include guard
const Char * c_str(void) const
Returns the null-terminated c-string.
Definition: ref_tpl.hpp:200
ObjectOps & CoverStroke(PathNVStrokeCoverMode mode)
Covers the stencilled path stroke.
Definition: path.hpp:923
PathNVDashOffsetReset
Path dash offset reset mode enumeration.
Definition: dash_offset_reset.hpp:27
ObjectOps & Commands(GLsizei num_commands, const PathNVCommand *commands, GLsizei num_coords, const CoordType *coords)
Specifies the path via a sequence of commands and coordinates.
Definition: path.hpp:93
ObjectOps & ClientLength(GLfloat value)
Sets the client length value.
Definition: path.hpp:824
GLfloat ClientLength(void)
Returns the client length value.
Definition: path.hpp:845
ObjectOps & TerminalEndCap(PathNVCapStyle style)
Sets the terminal end cap style.
Definition: path.hpp:662
PathNVFillCoverMode
Path fill covering mode.
Definition: fill_cover_mode.hpp:27
PathNVCommand
Path specification command enumeration.
Definition: command.hpp:27
static PathNVName Copy(PathNVName dest_path, PathNVName src_path)
Copy path.
Definition: path.hpp:939
bool PointAlong(GLsizei start_segment, GLsizei num_segments, GLfloat distance, GLfloat &ref_x, GLfloat &ref_y, GLfloat &ref_tg_x, GLfloat &ref_tg_y) const
Get a point along the specified segment of the path.
Definition: path.hpp:500
ObjectOps & Dashes(T...dashes)
Sets the path dash array.
Definition: path.hpp:810
Wrapper for the NV_path_rendering dash offset reset enumeration.
Wrapper for the NV_path_rendering fill cover mode enumeration.
ObjectOps & DashOffsetReset(PathNVDashOffsetReset mode)
Sets the dash reset mode.
Definition: path.hpp:768
Wrapper for the NV_path_rendering fill mode enumeration.
PathNVStrokeCoverMode
Path stroke covering move.
Definition: stroke_cover_mode.hpp:27
ObjectOps & Commands(const std::vector< PathNVCommand > &commands, const std::vector< CoordType > &coords)
Specifies the path via a sequence of commands and coordinates.
Definition: path.hpp:122
PathNVFormat
Path specification string format enumeration.
Definition: format.hpp:27
ObjectOps & PSString(StrCRef path_string)
Specifies the path using a Postscript string.
Definition: path.hpp:430
Wrapper for the NV_path_rendering extension.
Declaration of OGLplus object-related error.
Wrapper for the NV_path_rendering stroke cover mode enumeration.
Generic OpenGL object wrapper.
PathNVCapStyle
Path cap mode enumeration.
Definition: cap_style.hpp:27
static PathNVName Interpolate(PathNVName dest_path, PathNVName path_a, PathNVName path_b, GLfloat weight)
Interpolates between two paths.
Definition: path.hpp:962
ObjectOps & SVGString(GLsizei length, const GLchar *path_string)
Specifies the path using an SVG string.
Definition: path.hpp:394
ObjectOps & Coords(GLsizei num_coords, const CoordType *coords)
Specifies the path via a sequence of coordinates.
Definition: path.hpp:164
Implements operations applicable to named (non-zero) objects.
Definition: wrap_tpl.hpp:45
bool IsPointInFill(GLuint mask, GLfloat x, GLfloat y) const
Checks if the specified point is in the path interior.
Definition: path.hpp:441
Wrapper for the NV_path_rendering path specification wrapper.
GLuint GetGLName(ObjectName< ObjTag > named)
Returns the GLuint OpenGL name assigned to named object.
Definition: name.hpp:38
ObjectOps & MiterLimit(GLfloat width)
Sets the miter limit.
Definition: path.hpp:577
std::size_t size(void) const
Return the size (length) string.
Definition: ref_tpl.hpp:149
ObjectOps & SubCommands(GLsizei command_start, GLsizei commands_to_delete, const std::vector< PathNVCommand > &commands, const std::vector< CoordType > &coords)
Replaces a part of the the path with new commands and coordinates.
Definition: path.hpp:241
GLfloat DashOffset(void)
Gets the dash offset value.
Definition: path.hpp:746
PathNVFillMode
Path fill mode.
Definition: fill_mode.hpp:27
ObjectOps & CoverFill(PathNVFillCoverMode mode)
Covers the stencilled path interior (fill)
Definition: path.hpp:887
ObjectOps & PSString(GLsizei length, const GLchar *path_string)
Specifies the path using a Postscript string.
Definition: path.hpp:418
ObjectOps & SubCoords(GLsizei coord_start, const std::vector< CoordType > &coords)
Replaces some of the paths coordinates.
Definition: path.hpp:321
bool IsPointInStroke(GLfloat x, GLfloat y) const
Checks if the specified point is on the path outline.
Definition: path.hpp:461
String const reference wrapper template.
Definition: ref_tpl.hpp:72
ObjectOps & Spec(const PathNVSpec< CoordType > &spec)
Specifies the path via the PathNVSpec class.
Definition: path.hpp:152
ObjectOps & Coords(const std::vector< CoordType > &coords)
Specifies the path via a sequence of coordinates.
Definition: path.hpp:186
Wrapper for the NV_path_rendering cap style enumeration.
GLfloat MiterLimit(void)
Gets the miter limit value.
Definition: path.hpp:598
Implements operations applicable to any object including object 0 (zero)
Definition: fwd.hpp:157
Data type-related declarations.
ObjectOps & DashOffset(GLfloat width)
Sets the dash offset.
Definition: path.hpp:725
ObjectOps & InitialDashCap(PathNVCapStyle style)
Sets the initial dash cap style.
Definition: path.hpp:683
Template class for convenient specifying of path commands and coordinates.
Definition: path_spec.hpp:32
GLfloat StrokeWidth(void)
Gets the stroke width value.
Definition: path.hpp:555
Wrapper for the NV_path_rendering command enumeration.
PathNVJoinStyle
Stroke line join style enumeration.
Definition: join_style.hpp:27
ObjectOps & StrokeWidth(GLfloat width)
Sets the stroke width value.
Definition: path.hpp:534
static PathNVName Transform(PathNVName dest_path, PathNVName src_path, PathNVTransformType transform_type, const GLfloat *transform_values)
Transforms a path.
Definition: path.hpp:988
ObjectOps & DashArray(GLsizei dash_count, const GLfloat *dash_array)
Sets the path dash array.
Definition: path.hpp:788
ObjectOps & SVGString(StrCRef path_string)
Specifies the path using an SVG string.
Definition: path.hpp:406
ObjectOps & InitialEndCap(PathNVCapStyle style)
Sets the initial end cap style.
Definition: path.hpp:641
ObjectOps & SubCoords(GLsizei coord_start, GLsizei num_coords, const CoordType *coords)
Replaces some of the paths coordinates.
Definition: path.hpp:294
Exception class for GL object-related errors.
Definition: object.hpp:24
ObjectOps< tag::DirectState, tag::PathNV > PathNVOps
PathNV operations with direct state access.
Definition: path.hpp:1013
ObjectOps & SubCommands(GLsizei command_start, GLsizei commands_to_delete, GLsizei num_commands, const PathNVCommand *commands, GLsizei num_coords, const CoordType *coords)
Replaces a part of the the path with new commands and coordinates.
Definition: path.hpp:208
ObjectOps & PathString(PathNVFormat format, StrCRef path_string)
Specifies the path using an SVG string.
Definition: path.hpp:372
GLfloat GetLength(GLsizei start_segment, GLsizei num_segments) const
Returns the approximation of the length of the path.
Definition: path.hpp:480
ObjectOps & PathString(PathNVFormat format, GLsizei length, const GLchar *path_string)
Specifies the path using a string.
Definition: path.hpp:347
ObjectOps & JoinStyle(PathNVJoinStyle style)
Sets the stroke join style.
Definition: path.hpp:620
PathNVTransformType
Path transform type enumeration.
Definition: transform_type.hpp:27
ObjectOps & StencilStroke(GLint reference, GLuint mask)
Writes the path stroke into the stencil buffer.
Definition: path.hpp:903
ObjectOps & SubSpec(GLsizei command_start, GLsizei commands_to_delete, const PathNVSpec< CoordType > &spec)
Replaces a part of the the path with new commands and coordinates.
Definition: path.hpp:273
Object< PathNVOps > PathNV
An oglplus_object encapsulating the nVidia path functionality.
Definition: path.hpp:1019
ObjectOps & StencilFill(PathNVFillMode mode, GLuint mask)
Writes the path interior (fill) into the stencil buffer.
Definition: path.hpp:867
ObjectOps & TerminalDashCap(PathNVCapStyle style)
Sets the terminal dash cap style.
Definition: path.hpp:704