Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > 2cca44f12eb8ef579d4d0baff7068f29 > files > 203

ghc-OpenGL-devel-2.2.3.0-7.fc15.i686.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Graphics.Rendering.OpenGL.GL.LineSegments</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_Graphics-Rendering-OpenGL-GL-LineSegments.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Graphics-Rendering-OpenGL-GL-LineSegments.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">OpenGL-2.2.3.0: A binding for the OpenGL graphics system</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>portable</td></tr><tr><th>Stability</th><td>stable</td></tr><tr><th>Maintainer</th><td>sven.panne@aedion.de</td></tr></table><p class="caption">Graphics.Rendering.OpenGL.GL.LineSegments</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Line Rasterization
</a></li><li><a href="#g:2">Line Stipple
</a></li><li><a href="#g:3">Line Antialiasing
</a></li><li><a href="#g:4">Implementation-Dependent Limits
</a></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc"><p>This module corresponds to section 3.4 (Line Segments) of the OpenGL 2.1
 specs.
</p></div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><a href="#v:lineWidth">lineWidth</a> :: <a href="Graphics-Rendering-OpenGL-GL-StateVar.html#t:StateVar">StateVar</a> <a href="Graphics-Rendering-OpenGL-GL-BasicTypes.html#t:GLfloat">GLfloat</a></li><li class="src short"><a href="#v:lineStipple">lineStipple</a> :: <a href="Graphics-Rendering-OpenGL-GL-StateVar.html#t:StateVar">StateVar</a> (<a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Maybe.html#t:Maybe">Maybe</a> (<a href="Graphics-Rendering-OpenGL-GL-BasicTypes.html#t:GLint">GLint</a>, <a href="Graphics-Rendering-OpenGL-GL-BasicTypes.html#t:GLushort">GLushort</a>))</li><li class="src short"><a href="#v:lineSmooth">lineSmooth</a> :: <a href="Graphics-Rendering-OpenGL-GL-StateVar.html#t:StateVar">StateVar</a> <a href="Graphics-Rendering-OpenGL-GL-BasicTypes.html#t:Capability">Capability</a></li><li class="src short"><a href="#v:aliasedLineWidthRange">aliasedLineWidthRange</a> :: <a href="Graphics-Rendering-OpenGL-GL-StateVar.html#t:GettableStateVar">GettableStateVar</a> (<a href="Graphics-Rendering-OpenGL-GL-BasicTypes.html#t:GLfloat">GLfloat</a>, <a href="Graphics-Rendering-OpenGL-GL-BasicTypes.html#t:GLfloat">GLfloat</a>)</li><li class="src short"><a href="#v:smoothLineWidthRange">smoothLineWidthRange</a> :: <a href="Graphics-Rendering-OpenGL-GL-StateVar.html#t:GettableStateVar">GettableStateVar</a> (<a href="Graphics-Rendering-OpenGL-GL-BasicTypes.html#t:GLfloat">GLfloat</a>, <a href="Graphics-Rendering-OpenGL-GL-BasicTypes.html#t:GLfloat">GLfloat</a>)</li><li class="src short"><a href="#v:smoothLineWidthGranularity">smoothLineWidthGranularity</a> :: <a href="Graphics-Rendering-OpenGL-GL-StateVar.html#t:GettableStateVar">GettableStateVar</a> <a href="Graphics-Rendering-OpenGL-GL-BasicTypes.html#t:GLfloat">GLfloat</a></li></ul></div><div id="interface"><h1 id="g:1">Line Rasterization
</h1><div class="top"><p class="src"><a name="v:lineWidth" class="def">lineWidth</a> :: <a href="Graphics-Rendering-OpenGL-GL-StateVar.html#t:StateVar">StateVar</a> <a href="Graphics-Rendering-OpenGL-GL-BasicTypes.html#t:GLfloat">GLfloat</a><a href="src/Graphics-Rendering-OpenGL-GL-LineSegments.html#lineWidth" class="link">Source</a></p><div class="doc"><p><code><a href="Graphics-Rendering-OpenGL-GL-LineSegments.html#v:lineWidth">lineWidth</a></code> contains the rasterized width of both aliased and antialiased
 lines. The initial value is 1. Using a line width other than 1 has different
 effects, depending on whether line antialiasing is enabled (see
 <code><a href="Graphics-Rendering-OpenGL-GL-LineSegments.html#v:lineSmooth">lineSmooth</a></code>). Line antialiasing is initially disabled.
</p><p>If line antialiasing is disabled, the actual width is determined by rounding
 the supplied width to the nearest integer. (If the rounding results in the
 value 0, it is as if the line width were 1.) If <em>delta x</em> &gt;= <em>delta y</em>, <em>i</em>
 pixels are filled in each column that is rasterized, where <em>i</em> is the
 rounded value of <code><a href="Graphics-Rendering-OpenGL-GL-LineSegments.html#v:lineWidth">lineWidth</a></code>. Otherwise, <em>i</em> pixels are filled in each row
 that is rasterized.
</p><p>If antialiasing is enabled, line rasterization produces a fragment for each
 pixel square that intersects the region lying within the rectangle having
 width equal to the current line width, length equal to the actual length of
 the line, and centered on the mathematical line segment. The coverage value
 for each fragment is the window coordinate area of the intersection of the
 rectangular region with the corresponding pixel square. This value is saved
 and used in the final rasterization step.
</p><p>Not all widths can be supported when line antialiasing is enabled. If an
 unsupported width is requested, the nearest supported width is used. Only
 width 1 is guaranteed to be supported; others depend on the implementation.
  Likewise, there is a range for aliased line widths as well. To query the
 range of supported widths of antialiased lines and the size difference
 between supported widths within the range, query <code><a href="Graphics-Rendering-OpenGL-GL-LineSegments.html#v:smoothLineWidthRange">smoothLineWidthRange</a></code> and
 <code><a href="Graphics-Rendering-OpenGL-GL-LineSegments.html#v:smoothLineWidthGranularity">smoothLineWidthGranularity</a></code>, respectively. For aliased lines, query the
 supported range with <code><a href="Graphics-Rendering-OpenGL-GL-LineSegments.html#v:aliasedLineWidthRange">aliasedLineWidthRange</a></code>.
</p><p>The line width specified when <code><a href="Graphics-Rendering-OpenGL-GL-LineSegments.html#v:lineWidth">lineWidth</a></code> is set is always returned when it
 is queried. Clamping and rounding for aliased and antialiased lines have no
 effect on the specified value.
</p><p>A non-antialiased line width may be clamped to an implementation-dependent
 maximum.  Query <code><a href="Graphics-Rendering-OpenGL-GL-LineSegments.html#v:aliasedLineWidthRange">aliasedLineWidthRange</a></code> to determine the maximum width.
</p><p>An <code>Graphics.Rendering.OpenGL.GLU.Errors.InvalidValue</code> is generated if
 <code><a href="Graphics-Rendering-OpenGL-GL-LineSegments.html#v:lineWidth">lineWidth</a></code> is set to a value less than or equal to zero.
</p><p>An <code>Graphics.Rendering.OpenGL.GLU.Errors.InvalidOperation</code> is generated if
 <code><a href="Graphics-Rendering-OpenGL-GL-LineSegments.html#v:lineWidth">lineWidth</a></code> is set during
 <code>Graphics.Rendering.OpenGL.GL.BeginEnd.renderPrimitive</code>.
</p></div></div><h1 id="g:2">Line Stipple
</h1><div class="top"><p class="src"><a name="v:lineStipple" class="def">lineStipple</a> :: <a href="Graphics-Rendering-OpenGL-GL-StateVar.html#t:StateVar">StateVar</a> (<a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Maybe.html#t:Maybe">Maybe</a> (<a href="Graphics-Rendering-OpenGL-GL-BasicTypes.html#t:GLint">GLint</a>, <a href="Graphics-Rendering-OpenGL-GL-BasicTypes.html#t:GLushort">GLushort</a>))<a href="src/Graphics-Rendering-OpenGL-GL-LineSegments.html#lineStipple" class="link">Source</a></p><div class="doc"><p>Line stippling masks out certain fragments produced by rasterization; those
 fragments will not be drawn. The masking is achieved by using three
 parameters: the repeat count (1st element of the <code><a href="Graphics-Rendering-OpenGL-GL-LineSegments.html#v:lineStipple">lineStipple</a></code> pair, clamped
 to the range [ 1 .. 256 ]), the 16-bit line stipple pattern (2nd element),
 and an integer stipple counter <em>s</em>.
</p><p>The counter <em>s</em> is reset to 0 at before the first action during
 <code>Graphics.Rendering.OpenGL.GL.BeginEnd.renderPrimitive</code> is called and before
 each line segment during
 <code>Graphics.Rendering.OpenGL.GL.BeginEnd.renderPrimitive</code> is generated. It is
 incremented after each fragment of a unit width aliased line segment is
 generated or after each <em>i</em> fragments of an <em>i</em> width line segment are
 generated. The <em>i</em> fragments associated with count <em>s</em> are masked out if
 <code><code>Data.Bits.testBit</code> <em>pattern</em> (( <em>s</em> / <em>factor</em> ) <em>mod</em> 16)</code> is <code><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Bool.html#v:False">False</a></code>,
 otherwise these fragments are sent to the frame buffer. Bit zero of the
 pattern is the least significant bit, i.e. it is used first.
</p><p>Antialiased lines are treated as a sequence of rectangles of height 1 for
 purposes of stippling. Whether rectangle <em>s</em> is rasterized or not depends on
 the fragment rule described for aliased lines, counting rectangles rather
 than groups of fragments.
</p><p>The initial value of <code><a href="Graphics-Rendering-OpenGL-GL-LineSegments.html#v:lineStipple">lineStipple</a></code> is <code><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Maybe.html#v:Nothing">Nothing</a></code>, i.e. line stippling is
 disabled.
</p><p>An <code>Graphics.Rendering.OpenGL.GLU.Errors.InvalidOperation</code> is generated if
 <code><a href="Graphics-Rendering-OpenGL-GL-LineSegments.html#v:lineStipple">lineStipple</a></code> is set during
 <code>Graphics.Rendering.OpenGL.GL.BeginEnd.renderPrimitive</code>.
</p></div></div><h1 id="g:3">Line Antialiasing
</h1><div class="top"><p class="src"><a name="v:lineSmooth" class="def">lineSmooth</a> :: <a href="Graphics-Rendering-OpenGL-GL-StateVar.html#t:StateVar">StateVar</a> <a href="Graphics-Rendering-OpenGL-GL-BasicTypes.html#t:Capability">Capability</a><a href="src/Graphics-Rendering-OpenGL-GL-LineSegments.html#lineSmooth" class="link">Source</a></p><div class="doc"><p>Controls whether line antialiasing is enabled. The initial state is
 <code>Graphics.Rendering.OpenGL.GL.BasicTypes.Disabled</code>.
</p></div></div><h1 id="g:4">Implementation-Dependent Limits
</h1><div class="top"><p class="src"><a name="v:aliasedLineWidthRange" class="def">aliasedLineWidthRange</a> :: <a href="Graphics-Rendering-OpenGL-GL-StateVar.html#t:GettableStateVar">GettableStateVar</a> (<a href="Graphics-Rendering-OpenGL-GL-BasicTypes.html#t:GLfloat">GLfloat</a>, <a href="Graphics-Rendering-OpenGL-GL-BasicTypes.html#t:GLfloat">GLfloat</a>)<a href="src/Graphics-Rendering-OpenGL-GL-LineSegments.html#aliasedLineWidthRange" class="link">Source</a></p><div class="doc"><p>The smallest and largest supported width of aliased lines.
</p></div></div><div class="top"><p class="src"><a name="v:smoothLineWidthRange" class="def">smoothLineWidthRange</a> :: <a href="Graphics-Rendering-OpenGL-GL-StateVar.html#t:GettableStateVar">GettableStateVar</a> (<a href="Graphics-Rendering-OpenGL-GL-BasicTypes.html#t:GLfloat">GLfloat</a>, <a href="Graphics-Rendering-OpenGL-GL-BasicTypes.html#t:GLfloat">GLfloat</a>)<a href="src/Graphics-Rendering-OpenGL-GL-LineSegments.html#smoothLineWidthRange" class="link">Source</a></p><div class="doc"><p>The smallest and largest supported width of antialiased lines.
</p></div></div><div class="top"><p class="src"><a name="v:smoothLineWidthGranularity" class="def">smoothLineWidthGranularity</a> :: <a href="Graphics-Rendering-OpenGL-GL-StateVar.html#t:GettableStateVar">GettableStateVar</a> <a href="Graphics-Rendering-OpenGL-GL-BasicTypes.html#t:GLfloat">GLfloat</a><a href="src/Graphics-Rendering-OpenGL-GL-LineSegments.html#smoothLineWidthGranularity" class="link">Source</a></p><div class="doc"><p>The antialiased line width granularity, i.e. the size difference between
 supported widths.
</p></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.9.2</p></div></body></html>