Pixmap and OpenGL

I try to port an Irix GL program to OpenGL.
I have created many X-window programs, but not so many OpenGL programs.

I try to copy drawing area to a pixmap.
I can not get it to work, with XCreatePixmap, glXCreateGLXPixmap,XCopyArea

Can anyone give me an example ?

Regards Bengt