Porting GLX Pixmap Code
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 2N1 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 uses device-independent bitmaps that serve the same function as X Window System pixmaps. Use the standard Windows bitmap functions to create and destroy bitmaps.
The following table lists the GLX pixmap functions and their equivalent Windows bitmap functions.
|GLX pixmap and font function||Windows bitmap and font function|
|GLXPixmapglXCreateGLXPixmap( 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,LPBITMAPINFO lpbmi,DWORD fInit,DWORD iUsage)
|void glXDestroyGLXPixmap( Display *dpy,GLXPixmap pix)||BOOL DeleteObject( HGDIOBJ hObject)|
Build date: 3/6/2012