<!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>glXCreateGLXPixmap</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /></head><body><div class="refentry" lang="en" xml:lang="en"><a id="glXCreateGLXPixmap"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>glXCreateGLXPixmap — create an off-screen GLX rendering area</p></div><div class="refsynopsisdiv"><h2>C Specification</h2><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0"><tr><td><code class="funcdef">GLXPixmap <b class="fsfunc">glXCreateGLXPixmap</b>(</code></td><td>Display *  </td><td><var class="pdparam">dpy</var>, </td></tr><tr><td> </td><td>XVisualInfo *  </td><td><var class="pdparam">vis</var>, </td></tr><tr><td> </td><td>Pixmap  </td><td><var class="pdparam">pixmap</var><code>)</code>;</td></tr></table></div></div><div class="refsect1" lang="en" xml:lang="en"><a id="parameters"></a><h2>Parameters</h2><div class="variablelist"><dl><dt><span class="term"><em class="parameter"><code>dpy</code></em></span></dt><dd><p>
                    Specifies the connection to the X server.
                </p></dd><dt><span class="term"><em class="parameter"><code>vis</code></em></span></dt><dd><p>
                    Specifies the visual that defines the structure of the rendering area.
                    It is a pointer to an <code class="constant">XVisualInfo</code> structure,
                    not a visual ID or a pointer to a <code class="constant">Visual</code>.
                </p></dd><dt><span class="term"><em class="parameter"><code>pixmap</code></em></span></dt><dd><p>
                    Specifies the X pixmap that will be used as the front left color buffer
                    of the off-screen rendering area.
                </p></dd></dl></div></div><div class="refsect1" lang="en" xml:lang="en"><a id="description"></a><h2>Description</h2><p>
            <code class="function">glXCreateGLXPixmap</code> creates an off-screen rendering area and returns its XID.
            Any GLX rendering context that was created with respect to <em class="parameter"><code>vis</code></em>
            can be used to render into this off-screen area.
            Use <a class="citerefentry" href="glXMakeCurrent.xml"><span class="citerefentry"><span class="refentrytitle">glXMakeCurrent</span></span></a> to associate the rendering area with a GLX
            rendering context.
        </p><p>
            The X pixmap identified by <em class="parameter"><code>pixmap</code></em> is used as the front left buffer of the
            resulting off-screen rendering area.
            All other buffers specified by <em class="parameter"><code>vis</code></em>,
            including color buffers other than the front left buffer,
            are created without externally visible names.
            GLX pixmaps with double-buffering are supported.
            However, <a class="citerefentry" href="glXSwapBuffers.xml"><span class="citerefentry"><span class="refentrytitle">glXSwapBuffers</span></span></a> is ignored by these pixmaps.
        </p><p>
            Some implementations may not support GLX pixmaps with direct rendering
            contexts. 
        </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="notes"></a><h2>Notes</h2><p>
            <code class="constant">XVisualInfo</code> is defined in <span class="emphasis"><em>Xutil.h.</em></span>
            It is a structure that includes <span class="emphasis"><em>visual</em></span>, <span class="emphasis"><em>visualID</em></span>, <span class="emphasis"><em>screen</em></span>, and
            <span class="emphasis"><em>depth</em></span> elements.
        </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="errors"></a><h2>Errors</h2><p>
            <code class="constant">BadMatch</code> is generated if the depth of <em class="parameter"><code>pixmap</code></em> does not match
            the depth value reported by core X11 for <em class="parameter"><code>vis</code></em>,
            or if <em class="parameter"><code>pixmap</code></em> was not created with respect to the same screen as <em class="parameter"><code>vis</code></em>.
        </p><p>
            <code class="constant">BadValue</code> is generated
            if <em class="parameter"><code>vis</code></em> is not a valid XVisualInfo pointer (for example, if a
            particular GLX implementation does not support this visual).
        </p><p>
            <code class="constant">BadPixmap</code> is generated if <em class="parameter"><code>pixmap</code></em> is not a valid pixmap.
        </p><p>
            <code class="constant">BadAlloc</code> is generated if the server cannot allocate the GLX
            pixmap.
        </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="seealso"></a><h2>See Also</h2><p>
            <a class="citerefentry" href="glXCreateContext.xml"><span class="citerefentry"><span class="refentrytitle">glXCreateContext</span></span></a>,
            <a class="citerefentry" href="glXCreatePixmap.xml"><span class="citerefentry"><span class="refentrytitle">glXCreatePixmap</span></span></a>,
            <a class="citerefentry" href="glXDestroyGLXPixmap.xml"><span class="citerefentry"><span class="refentrytitle">glXDestroyGLXPixmap</span></span></a>,
            <a class="citerefentry" href="glXIsDirect.xml"><span class="citerefentry"><span class="refentrytitle">glXIsDirect</span></span></a>,
            <a class="citerefentry" href="glXMakeCurrent.xml"><span class="citerefentry"><span class="refentrytitle">glXMakeCurrent</span></span></a>
        </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="Copyright"></a><h2>Copyright</h2><p>
            Copyright <span class="trademark"></span>© 1991-2006
            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>
