[ Next Article | Previous Article | Book Contents | Library Home | Legal | Search ]
OpenGL 1.2 for AIX: Reference Manual

glXCreatePixmap Subroutine

Purpose

Creates an off-screen GLX rendering area.

Library

OpenGL C bindings library: libGL.a

C Syntax

GLXPixmap glXCreatePixmap(Display *dpy,

                          GLXFBConfig config,
                          Pixmap Pixmap,
                          const int *AttributeList)

Description

The glXCreatePixmap subroutine creates an off-screen rendering area and returns its XID. Any GLX rendering context that was created with respect to the config parameter can be used to render into this off-screen area. Use the glXMakeContextCurrent subroutine to associate the rendering area with a GLX rendering context.

The X pixmap identified by the Pixmap parameter is used as the front left buffer of the resulting off-screen rendering area. All other buffers specified by the config parameter, including color buffers (other than the front left buffer), are created without externally visible names. GLX pixmaps with double-buffering are supported. However, the glXSwapBuffers subroutine is ignored by these pixmaps.

Direct rendering contexts cannot be used to render into GLX pixmaps.

Parameters

dpy Specifies the connection to the X server.
config Specifies the GLX FBConfig that defines the structure of the rendering area.
Pixmap Specifies the X pixmap that is used as the front left color buffer of the off-screen rendering area.
AttributeList Specifies a list of GLX attribute/value pairs that help define the GLX pixmap. Currently, there are no attributes that affect GLX pixmaps so list parameter must either be NULL or an empty list (first attribute of 0).

Error Codes

BadAlloc Is generated if the server cannot allocate the GLX pixmap.
BadMatch Is generated if one or more of the following is detected: the depth of Pixmap does not match the GLX_BUFFER_SIZE value of config or Pixmap was not created with respect to the same screen as config.
BadPixmap Is generated if Pixmap is not a valid pixmap.
BadFBConfig Is generated if configis not a valid GLX FBConfig or if the GLX FBConfig does not support pixmap rendering.

Files

/usr/include/GL/gl.h Contains C language constants, variable type definitions, and ANSI function prototypes for OpenGL.
/usr/include/GL/glx.h Contains C language constants, variable type definitions, and ANSI function prototypes for GLX.

Related Information

The glXCreateNewContext subroutine, glXIsDirect subroutine, glXMakeContextCurrent subroutine.

OpenGL in the AIXwindows (GLX) Environment.

OpenGL Overview.


[ Next Article | Previous Article | Book Contents | Library Home | Legal | Search ]