1GLLINEWIDTH(3G)                  OpenGL Manual                 GLLINEWIDTH(3G)
2
3
4

NAME

6       glLineWidth - specify the width of rasterized lines
7

C SPECIFICATION

9       void glLineWidth(GLfloat width);
10

PARAMETERS

12       width
13           Specifies the width of rasterized lines. The initial value is 1.
14

DESCRIPTION

16       glLineWidth specifies the rasterized width of both aliased and
17       antialiased lines. Using a line width other than 1 has different
18       effects, depending on whether line antialiasing is enabled. To enable
19       and disable line antialiasing, call glEnable() and glDisable() with
20       argument GL_LINE_SMOOTH. Line antialiasing is initially disabled.
21
22       If line antialiasing is disabled, the actual width is determined by
23       rounding the supplied width to the nearest integer. (If the rounding
24       results in the value 0, it is as if the line width were 1.) If Δ x >= Δ
25       y, i pixels are filled in each column that is rasterized, where i is
26       the rounded value of width. Otherwise, i pixels are filled in each row
27       that is rasterized.
28
29       If antialiasing is enabled, line rasterization produces a fragment for
30       each pixel square that intersects the region lying within the rectangle
31       having width equal to the current line width, length equal to the
32       actual length of the line, and centered on the mathematical line
33       segment. The coverage value for each fragment is the window coordinate
34       area of the intersection of the rectangular region with the
35       corresponding pixel square. This value is saved and used in the final
36       rasterization step.
37
38       Not all widths can be supported when line antialiasing is enabled. If
39       an unsupported width is requested, the nearest supported width is used.
40       Only width 1 is guaranteed to be supported; others depend on the
41       implementation. Likewise, there is a range for aliased line widths as
42       well. To query the range of supported widths and the size difference
43       between supported widths within the range, call glGet() with arguments
44       GL_ALIASED_LINE_WIDTH_RANGE, GL_SMOOTH_LINE_WIDTH_RANGE, and
45       GL_SMOOTH_LINE_WIDTH_GRANULARITY.
46

NOTES

48       The line width specified by glLineWidth is always returned when
49       GL_LINE_WIDTH is queried. Clamping and rounding for aliased and
50       antialiased lines have no effect on the specified value.
51
52       Nonantialiased line width may be clamped to an implementation-dependent
53       maximum. Call glGet() with GL_ALIASED_LINE_WIDTH_RANGE to determine the
54       maximum width.
55
56       In OpenGL 1.2, the tokens GL_LINE_WIDTH_RANGE and
57       GL_LINE_WIDTH_GRANULARITY were replaced by GL_ALIASED_LINE_WIDTH_RANGE,
58       GL_SMOOTH_LINE_WIDTH_RANGE, and GL_SMOOTH_LINE_WIDTH_GRANULARITY. The
59       old names are retained for backward compatibility, but should not be
60       used in new code.
61

ERRORS

63       GL_INVALID_VALUE is generated if width is less than or equal to 0.
64

ASSOCIATED GETS

66       glGet() with argument GL_LINE_WIDTH
67
68       glGet() with argument GL_ALIASED_LINE_WIDTH_RANGE
69
70       glGet() with argument GL_SMOOTH_LINE_WIDTH_RANGE
71
72       glGet() with argument GL_SMOOTH_LINE_WIDTH_GRANULARITY
73
74       glIsEnabled() with argument GL_LINE_SMOOTH
75

SEE ALSO

77       glEnable()
78
80       Copyright © 1991-2006 Silicon Graphics, Inc. This document is licensed
81       under the SGI Free Software B License. For details, see
82       http://oss.sgi.com/projects/FreeB/.
83

AUTHORS

85       opengl.org
86
87
88
89opengl.org                        06/10/2014                   GLLINEWIDTH(3G)
Impressum