Clive Harding (clive++at++reading.sgi.com)
Tue, 20 Oct 1998 20:28:20 +0100
From the man page to glXCreateGLXPbufferSGIX the following
section is relevent since you don't specify a visual when
creating a pbuffer.....
Any GLX rendering context created with a GLXFBConfig or X Visual
that is compatible with config may be used to render into the GLX pixel
buffer. A GLX context and a GLX pixel buffer are compatible if:
The context's render_type attribute (either GLX_RGBA_TYPE_SGIX
or GLX_COLOR_INDEX_TYPE_SGIX) is supported by the GLXFBConfigSGIX that
the pixel buffer was created with. For example, if the context's
render_type attribute is GLX_RGBA_TYPE_SGIX, then the
GLX_RENDER_TYPE_SGIX attribute of the pixel buffer's GLXFBConfigSGIX
must have the GLX_RGBA_BIT_SGIX bit set.
All color buffers and ancillary buffers that exist in both
GLXFBConfigSGIXs have the same depth. For example, a GLXFBConfigSGIX
that has a front left buffer and a back left buffer with red, green
and blue sizes of 4 is not compatible with a GLXFBConfigSGIX that
has only a front left buffer with red, green and blue sizes of 8.
However, it is compatible with a GLXFBConfigSGIX that has only a
front left buffer if the red, green and blue sizes are 4.
All this means that you can use the same GLXFBConfigSGIX to create
the pbuffer and when you choose the visual for the on-screen
window. You must be careful not to ask too much of the frame buffer
since you'll get a bad alloc. You should probably NOT ask for
double-buffer in the pbuffer (unless you're sure you need it)
and probably not have a depth buffer for the on screen window
but specify one for the pbuffer. The idea being that you render
to the pbuffer and only depth buffer that. The main window is
updated then by a simple pixel copy.
Hope that helps some.
Clive.
-- ________________________________________________________________ Clive Harding, Software Support Group, Silicon Graphics UK Ltd. Forum 1, Station Road, Theale, Reading, UK, RG7 4RA. Tel: 01189 307736 Fax: 01189 307775 Email: clive++at++sgi.com"Si non confectus, non reficiat."
This archive was generated by hypermail 2.0b2 on Tue Oct 20 1998 - 12:28:30 PDT