DrawBuffer

Can someone explain how buffering is working? Is it possible to avoid
buffering? Which size of buffer is optimal for faster drawing? Does
buffering work in direct mode?

Hi Alex,

I have spoken with one of the developers and here is some info that
should help:

The draw buffer is used to queue up a series of draw commands (called
the draw stream) for the application. Once the buffer is full or the
application issues a PgFlush() the list of commands is sent to the
photon server, and normally after that it is sent to io-graphics, which
will then interpret and render the draw stream. You must have a draw
buffer other wise you can’t queue up messages to send to io-graphics.

Optimal size depends on what you are drawing and how often you flush.
We’d need a better idea of what you are trying to draw before giving any
advice.

Buffering works in direct mode. In normal mode the stream is sent to
the photon server first by the application, which will then do some work
on it before sending it off (such as add clipping to represent the
regions (or windows) above the application, send the draw stream to the
regions that are sensitive to draw events (io-graphics, phrelay), etc.)

In direct mode the draw stream is sent directly to io-graphics. The
photon server doesn’t see it or process it so there are fewer context
switches (switching from one process to another) and fewer operations
done on the stream, which we found was a significantly faster way of
drawing.


Hope this helps
Regards
Brenda

Alex Timofeev wrote:

Can someone explain how buffering is working? Is it possible to avoid
buffering? Which size of buffer is optimal for faster drawing? Does
buffering work in direct mode?