
<refentry id="glXCreateGLXPixmap">
    <refmeta>
        <refmetainfo>
            <copyright>
                <year>1991-2006</year>
                <holder>Silicon Graphics, Inc.</holder>
            </copyright>
        </refmetainfo>
        <refentrytitle>glXCreateGLXPixmap</refentrytitle>
        <manvolnum>3G</manvolnum>
    </refmeta>
    <refnamediv>
        <refname>glXCreateGLXPixmap</refname>
        <refpurpose>create an off-screen GLX rendering area</refpurpose>
    </refnamediv>
    <refsynopsisdiv><title>C Specification</title>
        <funcsynopsis>
            <funcprototype>
                <funcdef>GLXPixmap <function>glXCreateGLXPixmap</function></funcdef>
                <paramdef>Display * <parameter>dpy</parameter></paramdef>
                <paramdef>XVisualInfo * <parameter>vis</parameter></paramdef>
                <paramdef>Pixmap <parameter>pixmap</parameter></paramdef>
            </funcprototype>
        </funcsynopsis>
    </refsynopsisdiv>
    <!-- eqn: ignoring delim $$ -->
    <refsect1 id="parameters"><title>Parameters</title>
        <variablelist>
        <varlistentry>
            <term><parameter>dpy</parameter></term>
            <listitem>
                <para>
                    Specifies the connection to the X server.
                </para>
            </listitem>
        </varlistentry>
        <varlistentry>
            <term><parameter>vis</parameter></term>
            <listitem>
                <para>
                    Specifies the visual that defines the structure of the rendering area.
                    It is a pointer to an <constant>XVisualInfo</constant> structure,
                    not a visual ID or a pointer to a <constant>Visual</constant>.
                </para>
            </listitem>
        </varlistentry>
        <varlistentry>
            <term><parameter>pixmap</parameter></term>
            <listitem>
                <para>
                    Specifies the X pixmap that will be used as the front left color buffer
                    of the off-screen rendering area.
                </para>
            </listitem>
        </varlistentry>
        </variablelist>
    </refsect1>
    <refsect1 id="description"><title>Description</title>
        <para>
            <function>glXCreateGLXPixmap</function> creates an off-screen rendering area and returns its XID.
            Any GLX rendering context that was created with respect to <parameter>vis</parameter>
            can be used to render into this off-screen area.
            Use <citerefentry><refentrytitle>glXMakeCurrent</refentrytitle></citerefentry> to associate the rendering area with a GLX
            rendering context.
        </para>
        <para>
            The X pixmap identified by <parameter>pixmap</parameter> is used as the front left buffer of the
            resulting off-screen rendering area.
            All other buffers specified by <parameter>vis</parameter>,
            including color buffers other than the front left buffer,
            are created without externally visible names.
            GLX pixmaps with double-buffering are supported.
            However, <citerefentry><refentrytitle>glXSwapBuffers</refentrytitle></citerefentry> is ignored by these pixmaps.
        </para>
        <para>
            Some implementations may not support GLX pixmaps with direct rendering
            contexts. 
        </para>
    </refsect1>
    <refsect1 id="notes"><title>Notes</title>
        <para>
            <constant>XVisualInfo</constant> is defined in <emphasis>Xutil.h.</emphasis>
            It is a structure that includes <emphasis>visual</emphasis>, <emphasis>visualID</emphasis>, <emphasis>screen</emphasis>, and
            <emphasis>depth</emphasis> elements.
        </para>
    </refsect1>
    <refsect1 id="errors"><title>Errors</title>
        <para>
            <constant>BadMatch</constant> is generated if the depth of <parameter>pixmap</parameter> does not match
            the depth value reported by core X11 for <parameter>vis</parameter>,
            or if <parameter>pixmap</parameter> was not created with respect to the same screen as <parameter>vis</parameter>.
        </para>
        <para>
            <constant>BadValue</constant> is generated
            if <parameter>vis</parameter> is not a valid XVisualInfo pointer (for example, if a
            particular GLX implementation does not support this visual).
        </para>
        <para>
            <constant>BadPixmap</constant> is generated if <parameter>pixmap</parameter> is not a valid pixmap.
        </para>
        <para>
            <constant>BadAlloc</constant> is generated if the server cannot allocate the GLX
            pixmap.
        </para>
    </refsect1>
    <refsect1 id="seealso"><title>See Also</title>
        <para>
            <citerefentry><refentrytitle>glXCreateContext</refentrytitle></citerefentry>,
            <citerefentry><refentrytitle>glXCreatePixmap</refentrytitle></citerefentry>,
            <citerefentry><refentrytitle>glXDestroyGLXPixmap</refentrytitle></citerefentry>,
            <citerefentry><refentrytitle>glXIsDirect</refentrytitle></citerefentry>,
            <citerefentry><refentrytitle>glXMakeCurrent</refentrytitle></citerefentry>
        </para>
    </refsect1>
    <refsect1 id="Copyright"><title>Copyright</title>
        <para>
            Copyright <trademark class="copyright"></trademark> 1991-2006
            Silicon Graphics, Inc. This document is licensed under the SGI
            Free Software B License. For details, see
            <ulink url="http://oss.sgi.com/projects/FreeB/">http://oss.sgi.com/projects/FreeB/</ulink>.
        </para>
    </refsect1>
</refentry>
