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

glXCreateWindow Subroutine

Purpose

Creates an on-screen GLX rendering area.

Library

OpenGL C bindings library: libGL.a

C Syntax

GLXWindow glXCreateWindow(Display *dpy,

                          GLXFBConfig config,
                          Window window,
                          const int *AttributeList)

Description

The glXCreateWindow subroutine creates an on-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 on-screen area. Use the glXMakeContextCurrent subroutine to associate the rendering area with a GLX rendering context.

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.
window Specifies the X window that is used as the on-screen rendering area.
AttributeList Specifies a list of GLX attribute/value pairs that help define the GLX window. Currently, there are no attributes that affect GLX windows 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 window or if window is already associated with another GLX FBConfig (as a result of a previous invocation of glXCreateWindow).
BadMatch Is generated if one or more of the following is detected: window was not created with the visual that corresponds to config, if config does not support rendering to GLX windows.
BadWindow Is generated if window is not a valid window.
GLXBadFBConfig Is generated if config is not a valid GLX FBConfig.

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, glXMakeContextCurrent subroutine.

OpenGL in the AIXwindows (GLX) Environment.

OpenGL Overview.


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