PgDrawPolygon()

I was trying to draw a graph of 2500 samples my first thought was to use a
trend graph widget, but it doesn’t do scaling it just uses (1 pixel for one
sample input). Since I need to display 2500 samples on a 1024 pixel wide
monitor I thought I would just use the raw drawing commands, however when I
try to draw more than a ~1200 point it just quits before it gets to the end.
I thought maybe the draw buffer wasn’t big enough and upped it to the max
(16bits unsigned 64k) using PgSetDrawBufferSize(), and it still won’t work.
Is there anything I can do about this?

Bob Smith <bobsmith@home.com> wrote:

I was trying to draw a graph of 2500 samples my first thought was to use a
trend graph widget, but it doesn’t do scaling it just uses (1 pixel for one
sample input). Since I need to display 2500 samples on a 1024 pixel wide
monitor I thought I would just use the raw drawing commands, however when I
try to draw more than a ~1200 point it just quits before it gets to the end.
I thought maybe the draw buffer wasn’t big enough and upped it to the max
(16bits unsigned 64k) using PgSetDrawBufferSize(), and it still won’t work.
Is there anything I can do about this?

If you flush after ~1200 points, does it work?

PgFlush();

or try

PgFFlush(1);

Even with the 64K buffer, you may be still overflowing
the draw buffer. Just suggestions, I am no expert on
this type of thing :slight_smile:. Failing that, someone will probably
want to see the code.

Regards.

Sorry I have been down at the lab for the last few weeks,

I was using the polyline function when I had the problem. If I draw the
individual line segments myself it seems

to work, I just thought that the polyline should be a consiterably more
efficient than calling a function in a loop 2500 times. I would expect the
video card to excellerate polyline type operations, since they are so
common.

What would be the efficient way to do this in QNX/Photon?

“Derek Leach” <dleach@qnx.com> wrote in message
news:b0moor$otq$1@inn.qnx.com

Bob Smith <> bobsmith@home.com> > wrote:
I was trying to draw a graph of 2500 samples my first thought was to use
a
trend graph widget, but it doesn’t do scaling it just uses (1 pixel for
one
sample input). Since I need to display 2500 samples on a 1024 pixel
wide
monitor I thought I would just use the raw drawing commands, however
when I
try to draw more than a ~1200 point it just quits before it gets to the
end.
I thought maybe the draw buffer wasn’t big enough and upped it to the
max
(16bits unsigned 64k) using PgSetDrawBufferSize(), and it still won’t
work.
Is there anything I can do about this?

If you flush after ~1200 points, does it work?

PgFlush();

or try

PgFFlush(1);

Even with the 64K buffer, you may be still overflowing
the draw buffer. Just suggestions, I am no expert on
this type of thing > :slight_smile:> . Failing that, someone will probably
want to see the code.

Regards.