Re: pBuffer

New Message Reply Date view Thread view Subject view Author view

Phil Keslin (philk++at++cthulhu.engr.sgi.com)
Wed, 16 Dec 1998 00:16:52 -0800


Here's a trick. There is a switch on glxinfo that will provide all of
the information on drawable types that can be allocated for each visual.
Try 'glxinfo -fbcinfo'. The drtyp field field will contain a 'w' for
window, 'p' for pixmap and 'P' for pbuffer. I don't know why the
designers chose the visuals they did. I sure they had some reason. :)

Francois Sillion wrote:
>
> Hello Phil,
>
> Here is more information about my Pbuffer problem:
> Symptom is that (a) I can't seem to get a single-buffered Pbuffer, and (b)
> when I request
> a Pbuffer size of 512^2 or higher the contents of the buffer as returned by
> glReadPixels
> is garbage (black background with some ghost performer stats in it). Note that
> when I request a 256^2 Pbuffer, or if I request PRESERVED_CONTENTS I get my
> image OK.
>
> From your previous answer though, I am not sure I understand correctly: are
> you saying
> that some other process could be stealing my Pbuffer evn while I am executing
> my draw callback? I call glReadPixels immediately after pfDraw on the Pbuffer
> draw callback.

Pbuffers may share storage with windows. I can't remember the actual
policy, but do know that they can get swapped (with PRESERVED_CONTENTS
set) based upon drawable activation (MakeCurrent). I don't know what is
causing the swapping in your case, but it could be any process that
renders to the pipe. If this happens anytime during the draw phase, the
pbuffer contents could get trashed (unless you've specified
PRESERVED_CONTENTS). I don't believe that grabbing the Xserver will help
in those cases where another process already has graphics mapped and is
ready to render.

What is the format of the window into which you are doing your final
rendering? For example, is it multisampled (probably) and if so how many
samples? Are you using accumulation buffers? How deep is your stencil
buffer and how many bits of Z?

Do you need 48 bit buffers (12 bits per component) for you pbuffer or
can you live with 30 bits? You don't seem to need alpha. A double buffer
10 bit per component visual will occupy 66% of the storage of the 12 bit
per component visuals.

As for success with the small pbuffers, does your final window cover the
entire screen? Finally, are there any other graphics programs running on
your machine (e.g., clock)?

[snip]

- Phil

-- 
Phil Keslin <philk++at++engr.sgi.com>

New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Wed Dec 16 1998 - 00:16:58 PST

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.