The X Window System uses pixmaps, which are off-screen virtual drawing surfaces in the form of a three-dimensional array of bits. You can think of a pixmap as a stack of bitmaps: a two-dimensional array of pixels with each pixel having a value from 0 to 2N–1 where N is the depth of the pixmap.
For OpenGL programs you use the GLX functions, glXCreateGLXPixmap and glXDestroyGLXPixmap, to create and destroy GLX pixmaps used for off-screen rendering.
Windows NT and Windows 95 use device-independent bitmaps that serve the same function as X Window System pixmaps. Use the standard Win32 bitmap functions to create and destroy bitmaps.
The following table lists the GLX pixmap functions and their equivalent Win32 bitmap functions.
GLX Pixmap and Font Function | Win32 Bitmap and Font Function |
---|---|
GLXPixmap glXCreateGLXPixmap(Display *dpy, XVisualInfo *vis, Pixmap pixmap) |
HBITMAP CreateDIBitmap(HDC hdc, LPBITMAPINFOHEADER lpbmih, DWORD fdwInit, CONST BYTE *lpbInit, LPBITMAPINFO lpbmi, UINT fuUsage)
HBITMAP CreateDIBSection(HDC hdc, |
void glXDestroyGLXPixmap(Display *dpy, GLXPixmap pix) |
BOOL DeleteObject(HGDIOBJ hObject) |