21.06.2014 Views

OpenGL 4.2 (Compatibility Profile) - April 27, 2012

OpenGL 4.2 (Compatibility Profile) - April 27, 2012

OpenGL 4.2 (Compatibility Profile) - April 27, 2012

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

3.6. POLYGONS 238<br />

In addition, during rasterization an integer stipple counter must be maintained to<br />

implement line stippling. The initial value of the line width is 1.0. The initial<br />

state of line segment antialiasing is disabled. The initial value of the line stipple is<br />

F F F F 16 (a stipple of all ones). The initial value of the line stipple repeat count is<br />

one. The initial state of line stippling is disabled.<br />

3.5.4 Line Multisample Rasterization<br />

If MULTISAMPLE is enabled, and the value of SAMPLE_BUFFERS is one, then lines<br />

are rasterized using the following algorithm, regardless of whether line antialiasing<br />

(LINE_SMOOTH) is enabled or disabled. Line rasterization produces a fragment for<br />

each framebuffer pixel with one or more sample points that intersect the rectangular<br />

region that is described in the Antialiasing portion of section 3.5.2 (Other Line<br />

Segment Features). If line stippling is enabled, the rectangular region is subdivided<br />

into adjacent unit-length rectangles, with some rectangles eliminated according to<br />

the procedure given in section 3.5.2, where “fragment” is replaced by “rectangle”.<br />

Coverage bits that correspond to sample points that intersect a retained rectangle<br />

are 1, other coverage bits are 0. Each depth value and set of associated data is<br />

produced by substituting the corresponding sample location into equation 3.5, then<br />

using the result to evaluate equation 3.7. An implementation may choose to assign<br />

the associated data to more than one sample by evaluating equation 3.5 at any<br />

location within the pixel including the fragment center or any one of the sample<br />

locations, then substituting into equation 3.6. The different associated data values<br />

need not be evaluated at the same location.<br />

Line width range and number of gradations are equivalent to those supported<br />

for antialiased lines.<br />

3.6 Polygons<br />

A polygon results from a triangle arising from a triangle strip, triangle fan, or series<br />

of separate triangles, a polygon Begin / End object, or a quadrilateral arising from a<br />

quadrilateral strip, series of separate quadrilaterals, or Rect command. Like points<br />

and line segments, polygon rasterization is controlled by several variables. Polygon<br />

antialiasing is controlled with Enable and Disable with the symbolic constant<br />

POLYGON_SMOOTH. The analog to line segment stippling for polygons is polygon<br />

stippling, described below.<br />

<strong>OpenGL</strong> <strong>4.2</strong> (<strong>Compatibility</strong> <strong>Profile</strong>) - <strong>April</strong> <strong>27</strong>, <strong>2012</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!