Sophie

Sophie

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

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.Points</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-Points.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Graphics-Rendering-OpenGL-GL-Points.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.Points</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Point Rasterization
</a></li><li><a href="#g:2">Controlling the Derived Size
</a></li><li><a href="#g:3">Fading Points
</a></li><li><a href="#g:4">Point Antialiasing
</a></li><li><a href="#g:5">Point Sprites
</a></li><li><a href="#g:6">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.3 (Points) 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:pointSize">pointSize</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:vertexProgramPointSize">vertexProgramPointSize</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:pointSizeRange">pointSizeRange</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="Graphics-Rendering-OpenGL-GL-BasicTypes.html#t:GLfloat">GLfloat</a>)</li><li class="src short"><a href="#v:pointDistanceAttenuation">pointDistanceAttenuation</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="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:pointFadeThresholdSize">pointFadeThresholdSize</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:pointSmooth">pointSmooth</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:pointSprite">pointSprite</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:aliasedPointSizeRange">aliasedPointSizeRange</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:smoothPointSizeRange">smoothPointSizeRange</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:smoothPointSizeGranularity">smoothPointSizeGranularity</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">Point Rasterization
</h1><div class="top"><p class="src"><a name="v:pointSize" class="def">pointSize</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-Points.html#pointSize" class="link">Source</a></p><div class="doc"><p><code><a href="Graphics-Rendering-OpenGL-GL-Points.html#v:pointSize">pointSize</a></code> contains the rasterized diameter of both aliased and
 antialiased points. The initial value is 1. Using a point size other than 1
 has different effects, depending on whether point antialiasing is enabled
 (see <code><a href="Graphics-Rendering-OpenGL-GL-Points.html#v:pointSmooth">pointSmooth</a></code>) or point sprites are enabled (see <code><a href="Graphics-Rendering-OpenGL-GL-Points.html#v:pointSprite">pointSprite</a></code>). Both
 are initially disabled.
</p><p>The specified point size is multiplied with a distance attenuation factor
 and clamped to the specified <code><a href="Graphics-Rendering-OpenGL-GL-Points.html#v:pointSizeRange">pointSizeRange</a></code>, and further clamped to the
 implementation-dependent point size range to produce the derived point size
 using
</p><pre>   <em>derivedSize</em> = <em>clamp</em> (<em>size</em> * <em>sqrt</em> (1 / (<em>a</em> + <em>b</em> * <em>d</em> + <em>c</em> * <em>d</em>^2)))</pre><p>where <em>d</em> is the eye-coordinate distance from the eye to the vertex, and <em>a</em>,
 <em>b</em>, and <em>c</em> are the distance attenuation coefficients (see
 <code><a href="Graphics-Rendering-OpenGL-GL-Points.html#v:pointDistanceAttenuation">pointDistanceAttenuation</a></code>).
</p><p>If multisampling is disabled, the computed point size is used as the point's
 width.
</p><p>If multisampling is enabled, the point may be faded by modifying the point
 alpha value (see <code>Graphics.Rendering.OpenGL.GL.PerFragment.sampleCoverage</code>)
 instead of allowing the point width to go below a given
 <code><a href="Graphics-Rendering-OpenGL-GL-Points.html#v:pointFadeThresholdSize">pointFadeThresholdSize</a></code>. In this case, the width is further modified in
 the following manner:
</p><pre>   <em>width</em> = if <em>derivedSize</em> &gt;= <em>threshold</em> then <em>derivedSize</em> else <em>threshold</em></pre><p>The point alpha value is modified by computing:
</p><pre>   <em>alpha</em> = if <em>derivedSize</em> &gt;= <em>threshold</em> then 1 else (<em>derivedSize</em> / <em>threshold</em>)^2</pre><p>If point antialiasing is disabled, the actual size is determined by rounding
 the supplied size to the nearest integer. (If the rounding results in the
 value 0, it is as if the point size were 1.) If the rounded size is odd,
 then the center point (<em>x</em>, <em>y</em>) of the pixel fragment that represents
 the point is computed as
</p><pre>   (<em>x</em>, <em>y</em>) = (<em>floor</em> <em>xw</em> + 0.5, <em>floor</em> <em>yw</em> + 0.5)</pre><p>where <em>xw</em> and <em>yw</em> indicate window coordinates. All pixels that lie within
 the square grid of the rounded size centered at (<em>x</em>, <em>y</em>) make up the
 fragment. If the size is even, the center point is
</p><pre>   (<em>x</em>, <em>y</em>) = (<em>floor</em> (<em>xw</em> + 0.5), <em>floor</em> (<em>yw</em> + 0.5))</pre><p>and the rasterized fragment's centers are the half-integer window
 coordinates within the square of the rounded size centered at (<em>x</em>, <em>y</em>). All
 pixel fragments produced in rasterizing a nonantialiased point are assigned
 the same associated data, that of the vertex corresponding to the point.
</p><p>If antialiasing is enabled, then point rasterization produces a fragment for
 each pixel square that intersects the region lying within the circle having
 diameter equal to the current point size and centered at the point's
 (<em>xw</em>, <em>yw</em>). The coverage value for each fragment is the window coordinate
 area of the intersection of the circular region with the corresponding pixel
 square. This value is saved and used in the final rasterization step. The
 data associated with each fragment is the data associated with the point
 being rasterized.
</p><p>Not all sizes are supported when point antialiasing is enabled. If an
 unsupported size is requested, the nearest supported size is used.  Only size
 1 is guaranteed to be supported; others depend on the implementation. To
 query the range of supported sizes for antialiased points and the size
 difference between supported sizes within the range, query
 <code><a href="Graphics-Rendering-OpenGL-GL-Points.html#v:smoothPointSizeRange">smoothPointSizeRange</a></code> and <code><a href="Graphics-Rendering-OpenGL-GL-Points.html#v:smoothPointSizeGranularity">smoothPointSizeGranularity</a></code>, respectively. For
 aliased points, query the supported range with <code><a href="Graphics-Rendering-OpenGL-GL-Points.html#v:aliasedPointSizeRange">aliasedPointSizeRange</a></code>.
</p><p>The point size specified when <code><a href="Graphics-Rendering-OpenGL-GL-Points.html#v:pointSize">pointSize</a></code> is set is always returned when it
 is queried. Clamping and rounding for aliased and antialiased points have no
 effect on the specified value.
</p><p>A non-antialiased point size may be clamped to an implementation-dependent
 maximum. Although this maximum cannot be queried, it must be no less than the
 maximum value for antialiased points, rounded to the nearest integer value.
</p><p>An <code>Graphics.Rendering.OpenGL.GLU.Errors.InvalidValue</code> is generated if
 <code><a href="Graphics-Rendering-OpenGL-GL-Points.html#v:pointSize">pointSize</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-Points.html#v:pointSize">pointSize</a></code> is set during
 <code>Graphics.Rendering.OpenGL.GL.BeginEnd.renderPrimitive</code>.
</p></div></div><div class="top"><p class="src"><a name="v:vertexProgramPointSize" class="def">vertexProgramPointSize</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-Points.html#vertexProgramPointSize" class="link">Source</a></p></div><h1 id="g:2">Controlling the Derived Size
</h1><div class="top"><p class="src"><a name="v:pointSizeRange" class="def">pointSizeRange</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="Graphics-Rendering-OpenGL-GL-BasicTypes.html#t:GLfloat">GLfloat</a>)<a href="src/Graphics-Rendering-OpenGL-GL-Points.html#pointSizeRange" class="link">Source</a></p><div class="doc"><p>The range to which the derived point size is clamped, see <code><a href="Graphics-Rendering-OpenGL-GL-Points.html#v:pointSize">pointSize</a></code>. Note
 that the size is further clamped to the implementation-dependent limits, see
 <code><a href="Graphics-Rendering-OpenGL-GL-Points.html#v:aliasedPointSizeRange">aliasedPointSizeRange</a></code> and <code><a href="Graphics-Rendering-OpenGL-GL-Points.html#v:smoothPointSizeRange">smoothPointSizeRange</a></code>. The initial range is
 (0, 1).
</p><p>An <code>Graphics.Rendering.OpenGL.GLU.Errors.InvalidValue</code> is generated if the
 lower or upper bound of the range is set to a value less than zero. If the
 lower bound is greater than the upper bound, the point size after clamping is
 undefined, but no error is generated.
</p></div></div><div class="top"><p class="src"><a name="v:pointDistanceAttenuation" class="def">pointDistanceAttenuation</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="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-Points.html#pointDistanceAttenuation" class="link">Source</a></p><div class="doc"><p>The  constant, linear, and quadratic distance attenuation coefficients, see
 <code><a href="Graphics-Rendering-OpenGL-GL-Points.html#v:pointSize">pointSize</a></code>. The initial coefficients are (1, 0, 0).
</p></div></div><h1 id="g:3">Fading Points
</h1><div class="top"><p class="src"><a name="v:pointFadeThresholdSize" class="def">pointFadeThresholdSize</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-Points.html#pointFadeThresholdSize" class="link">Source</a></p><div class="doc"><p>The threshold for alpha attenuation of points when multisampling is used,
 see <code><a href="Graphics-Rendering-OpenGL-GL-Points.html#v:pointSize">pointSize</a></code>. The initial threshold is 1.
</p><p>An <code>Graphics.Rendering.OpenGL.GLU.Errors.InvalidValue</code> is generated if the
 threshold is set to a value less than zero.
</p></div></div><h1 id="g:4">Point Antialiasing
</h1><div class="top"><p class="src"><a name="v:pointSmooth" class="def">pointSmooth</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-Points.html#pointSmooth" class="link">Source</a></p><div class="doc"><p>Controls whether point antialiasing is enabled. The initial state is
 <code>Graphics.Rendering.OpenGL.GL.BasicTypes.Disabled</code>.
</p></div></div><h1 id="g:5">Point Sprites
</h1><div class="top"><p class="src"><a name="v:pointSprite" class="def">pointSprite</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-Points.html#pointSprite" class="link">Source</a></p><div class="doc"><p>Controls whether point sprites are enabled. The initial state is
 <code>Graphics.Rendering.OpenGL.GL.BasicTypes.Disabled</code>. When point sprites are
 enabled, the state of point antialiasing (i.e. <code><a href="Graphics-Rendering-OpenGL-GL-Points.html#v:pointSmooth">pointSmooth</a></code>) is ignored.
</p></div></div><h1 id="g:6">Implementation-Dependent Limits
</h1><div class="top"><p class="src"><a name="v:aliasedPointSizeRange" class="def">aliasedPointSizeRange</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-Points.html#aliasedPointSizeRange" class="link">Source</a></p><div class="doc"><p>The smallest and largest supported size of aliased points.
</p></div></div><div class="top"><p class="src"><a name="v:smoothPointSizeRange" class="def">smoothPointSizeRange</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-Points.html#smoothPointSizeRange" class="link">Source</a></p><div class="doc"><p>The smallest and largest supported size of antialiased points.
</p></div></div><div class="top"><p class="src"><a name="v:smoothPointSizeGranularity" class="def">smoothPointSizeGranularity</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-Points.html#smoothPointSizeGranularity" class="link">Source</a></p><div class="doc"><p>The antialiased point size granularity, i.e. the size difference between
 supported sizes.
</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>