create some shared memory with PgShmemCreate, wrap a PhImage_t around it, and
pass that PhImage_t to PmMemCreateMC(), it will use it instead of creating one
of it’s own.
There is extra overhead with a PtLabel and PgDrawPhImagemx that you may
not want so PgDrawImagemx may be the better function for you.
Chris VanWyk <email@example.com> wrote:
I’m using PmMemCreateMC to create a memory context. Can I use shared memory
for this? Would that be faster? How would I draw to it?
I’m using PgDraw… functions to draw the images.
I’m displaying the image using a label widget and and setting the
Pt_ARG_LABEL_DATA. I’ve tried PgDrawPhImagemx, but not PgDrawImagemx because
the documentation recommended not to.
I was able to double my refresh rate by using an appropriate video driver (I
was using a generic video driver), but I’m still not quite up to where I
would like to be. Any suggestions would be greatly appreciated.
Erick Muis wrote:
What type of memory context are you using? Is it also shared memory?
Also what are you using to draw the images? are you using PgDrawImagemx
or PgDrawImage? have you tried them yet?
Chris VanWyk <> firstname.lastname@example.org> > wrote:
I’m trying to display graphics based on data that changes in real time.
I think I’ve done everything correctly (according to the documentation),
but I can’t get the graphics to update faster than 15 hz. I get 15 hz
when I run open loop, and only 6 hz when I pass messages to do the
drawing every frame (which I will need to do). I’m running this on a
500 Mhz pentium 3. I need to get this up to at least 30 hz. All I’m
drawing is about 20 lines and 20 text fields.
All I can think is that I’m going about things wrong. I’m drawing
everything to a memory context, using PgDrawLine and similar functions,
then flushing it to an image stored in shared memory. I display the
image using a label widget and and setting the Pt_ARG_LABEL_DATA
resource to the image every frame. I’ve experimented with
PgDrawPhImagemx for displaying the image, but I haven’t gotten that to
work. Would that be faster? Any suggestions or alternative approaches
would be appreciated.