real-time 2D graphics & qnx messaging

I seem to have solved my update rate problem when I run the app without
using qnx messaging. I’m up to about 75 hz. When I use qnx messaging
to send data to the photon app that is doing the drawing (the data is
needed every frame to produce the drawing), the update rate drops
considerably. What is really baffling is, when I run the same code
without displaying any images, each frame takes only 20 microseconds.
Yet when I combine the message passing with image drawing, my frame rate
drops to 22 hz. And when I add complexity to the drawing my frame rate
drops even further. If I add and subtract complexity without passing
messages, I see no difference in update rate. Any ideas what may be
going on?

Chris VanWyk

Hi Chris,

Could you please elaborate on what you are doing? What kind of messages
are you passing back and forth? are they small or large? Also how are
you mesuring your framerate? How are you drawing the images?

Erick.



Chris VanWyk <chris@faac.com> wrote:

I seem to have solved my update rate problem when I run the app without
using qnx messaging. I’m up to about 75 hz. When I use qnx messaging
to send data to the photon app that is doing the drawing (the data is
needed every frame to produce the drawing), the update rate drops
considerably. What is really baffling is, when I run the same code
without displaying any images, each frame takes only 20 microseconds.
Yet when I combine the message passing with image drawing, my frame rate
drops to 22 hz. And when I add complexity to the drawing my frame rate
drops even further. If I add and subtract complexity without passing
messages, I see no difference in update rate. Any ideas what may be
going on?

Chris VanWyk

I’m using Sendmx to pass the messages. They are currently very small for
testing. Only a few ints and floats. I am measuring the framerate by
running the app open-loop and timing each frame. I am timing each frame
using the pentium cycle counter and averaging over a large number of frames.
I am drawing the images by setting the Pt_ARG_LABEL_DATA resource for a label
widget to a pointer to the image. I’ve experimented with PgDrawImagemx, and
it works just as well, but I can’t seem to control the location of the
image. I set the position to (0,0) and the image seems to pop up in
different windows and I don’t how to control it.

Chris



Erick Muis wrote:

Hi Chris,

Could you please elaborate on what you are doing? What kind of messages
are you passing back and forth? are they small or large? Also how are
you mesuring your framerate? How are you drawing the images?

Erick.

Chris VanWyk <> chris@faac.com> > wrote:
I seem to have solved my update rate problem when I run the app without
using qnx messaging. I’m up to about 75 hz. When I use qnx messaging
to send data to the photon app that is doing the drawing (the data is
needed every frame to produce the drawing), the update rate drops
considerably. What is really baffling is, when I run the same code
without displaying any images, each frame takes only 20 microseconds.
Yet when I combine the message passing with image drawing, my frame rate
drops to 22 hz. And when I add complexity to the drawing my frame rate
drops even further. If I add and subtract complexity without passing
messages, I see no difference in update rate. Any ideas what may be
going on?

Chris VanWyk