<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "xhtml1-transitional.dtd">
<!-- saved from url=(0013)about:internet -->
<?xml-stylesheet type="text/xsl" href="mathml.xsl"?><html xmlns="http://www.w3.org/1999/xhtml" xmlns:pref="http://www.w3.org/2002/Math/preference" pref:renderer="mathplayer-dl"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>glPointSize</title><meta name="generator" content="DocBook XSL Stylesheets V1.76.1" /></head><body><div class="refentry" title="glPointSize"><a id="glPointSize"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>glPointSize — specify the diameter of rasterized points</p></div><div class="refsynopsisdiv" title="C Specification"><h2>C Specification</h2><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table"><tr><td><code class="funcdef">void <strong>fsfuncglPointSize</strong>(</code></td><td>GLfloat <var class="pdparam">size</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table"><tr><td><code class="funcdef">void <strong>fsfuncglPointSizex</strong>(</code></td><td>GLfixed <var class="pdparam">size</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1" title="Parameters"><a id="parameters"></a><h2>Parameters</h2><div class="variablelist"><dl><dt><span class="term">
                    <em class="parameter"><code>size</code></em>
                </span></dt><dd><p>Specifies the diameter of rasterized points. The
                    initial value is 1.</p></dd></dl></div></div><div class="refsect1" title="Description"><a id="description"></a><h2>Description</h2><p><code class="function">glPointSize</code>
        specifies the rasterized diameter of both aliased and
        antialiased points. Using a point size other than 1 has
        different effects, depending on whether point antialiasing is
        enabled. To enable and disable point antialiasing, call
        <a class="citerefentry" href="glEnable.xml"><span class="citerefentry"><span class="refentrytitle">glEnable</span></span></a>
        and
        <a class="citerefentry" href="glDisable.xml"><span class="citerefentry"><span class="refentrytitle">glDisable</span></span></a>
        with argument
        <code class="constant">GL_POINT_SMOOTH</code>.
        Point antialiasing is initially disabled.</p><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
        <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
            <mml:mfenced><mml:mi>x</mml:mi><mml:mi>y</mml:mi></mml:mfenced>
        </mml:math>
        of the pixel fragment that represents the point is computed
        as</p><div class="informalequation"><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
            <mml:mfenced>
                <mml:mrow>
                    <mml:mo>[</mml:mo>
                    <mml:msub><mml:mi>x</mml:mi><mml:mi>w</mml:mi></mml:msub>
                    <mml:mo>]</mml:mo>
                    <mml:mo>+</mml:mo>
                    <mml:mfrac><mml:mn>1</mml:mn><mml:mn>2</mml:mn></mml:mfrac>
                </mml:mrow>
                <mml:mrow>
                    <mml:mo>[</mml:mo>
                    <mml:msub><mml:mi>y</mml:mi><mml:mi>w</mml:mi></mml:msub>
                    <mml:mo>]</mml:mo>
                    <mml:mo>+</mml:mo>
                    <mml:mfrac><mml:mn>1</mml:mn><mml:mn>2</mml:mn></mml:mfrac>
                </mml:mrow>
            </mml:mfenced>
        </mml:math></div><p>where <em class="replaceable"><code>w</code></em>
        subscripts indicate window coordinates. All pixels that lie
        within the square grid of the rounded size centered at
        <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
            <mml:mfenced><mml:mi>x</mml:mi><mml:mi>y</mml:mi></mml:mfenced>
        </mml:math>
        make up the fragment. If the size is even, the center point
        is</p><div class="informalequation"><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
            <mml:mfenced>
                <mml:mrow>
                    <mml:mo>[</mml:mo>
                    <mml:msub><mml:mi>x</mml:mi><mml:mi>w</mml:mi></mml:msub>
                    <mml:mo>+</mml:mo>
                    <mml:mfrac><mml:mn>1</mml:mn><mml:mn>2</mml:mn></mml:mfrac>
                    <mml:mo>]</mml:mo>
                </mml:mrow>
                <mml:mrow>
                    <mml:mo>[</mml:mo>
                    <mml:msub><mml:mi>y</mml:mi><mml:mi>w</mml:mi></mml:msub>
                    <mml:mo>+</mml:mo>
                    <mml:mfrac><mml:mn>1</mml:mn><mml:mn>2</mml:mn></mml:mfrac>
                    <mml:mo>]</mml:mo>
                </mml:mrow>
            </mml:mfenced>
        </mml:math></div><p>and the rasterized fragment's centers are the
        half-integer window coordinates within the square of the
        rounded size centered at
        <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
            <mml:mfenced><mml:mi>x</mml:mi><mml:mi>y</mml:mi></mml:mfenced>
        </mml:math>.
        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
        <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
            <mml:mfenced>
                <mml:msub><mml:mi>x</mml:mi><mml:mi>w</mml:mi></mml:msub>
                <mml:msub><mml:mi>y</mml:mi><mml:mi>w</mml:mi></mml:msub>
            </mml:mfenced>
        </mml:math>.
        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, call
        <a class="citerefentry" href="glGet.xml"><span class="citerefentry"><span class="refentrytitle">glGet</span></span></a>
        with the argument
        <code class="constant">GL_SMOOTH_POINT_SIZE_RANGE</code>.
        For aliased points, query the supported ranges
        <a class="citerefentry" href="glGet.xml"><span class="citerefentry"><span class="refentrytitle">glGet</span></span></a>
        with the argument
        <code class="constant">GL_ALIASED_POINT_SIZE_RANGE</code>.</p></div><div class="refsect1" title="Notes"><a id="notes"></a><h2>Notes</h2><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></div><div class="refsect1" title="Errors"><a id="errors"></a><h2>Errors</h2><p>
        <code class="constant">GL_INVALID_VALUE</code> is generated if
        <em class="parameter"><code>size</code></em> is less than or equal to 0.</p></div><div class="refsect1" title="Associated Gets"><a id="associatedgets"></a><h2>Associated Gets</h2><p>
        <a class="citerefentry" href="glGet.xml"><span class="citerefentry"><span class="refentrytitle">glGet</span></span></a>
        with argument <code class="constant">GL_ALIASED_POINT_SIZE_RANGE</code></p><p>
        <a class="citerefentry" href="glGet.xml"><span class="citerefentry"><span class="refentrytitle">glGet</span></span></a>
        with argument <code class="constant">GL_SMOOTH_POINT_SIZE_RANGE</code></p></div><div class="refsect1" title="See Also"><a id="seealso"></a><h2>See Also</h2><p>
        <a class="citerefentry" href="glEnable.xml"><span class="citerefentry"><span class="refentrytitle">glEnable</span></span></a>,
        <a class="citerefentry" href="glGet.xml"><span class="citerefentry"><span class="refentrytitle">glGet</span></span></a>
        </p></div><div class="refsect1" title="Copyright"><a id="copyright"></a><h2>Copyright</h2><p>
            Copyright <span class="trademark"></span>© 2003-2004
            Silicon Graphics, Inc. This document is licensed under the SGI
            Free Software B License. For details, see
            <a class="ulink" href="http://oss.sgi.com/projects/FreeB/" target="_top">http://oss.sgi.com/projects/FreeB/</a>.
        </p></div></div></body></html>
