PDA

View Full Version : CWP getting VERY slow on multiply window



oshapir
11-15-2002, 06:38 AM
I took a small OpenGL & CPW program and converted it to 3 widows - one context version.
BUT, running the new multi-window program was VERY slow compared with the single window program.

Ant ideas??? Help is REALY needed here...

jmathies
11-18-2002, 12:26 PM
Originally posted by oshapir:
Ant ideas??? Help is REALY needed here...

Hey,

I've run multiwindow apps before without
any major slow down. Perhaps you could post
some code?

A solution might be to use the built in
timing routines to track the amount of time
your code spends in each window update
section to track down the slow code.

You can also use cpwMainLoopUpdate instead of
cpwMainLoop, and time it's usage to see if
the time used in occuring in event updates
or someplace else.

Regards,
Jim

oshapir
11-19-2002, 09:33 PM
How can I include the program in the reply?Thanks,
Oren Shapir.

[This message has been edited by oshapir (edited 11-19-2002).]

jmathies
11-21-2002, 09:21 AM
Originally posted by oshapir:
How can I include the program in the reply?Thanks,
Oren Shapir.


Just mail it directly to me and I'll compile it to take a look.. jim 'at' mathies 'dot' com. If not, mail me some code snippets or something, I'll try and help you at as best I can.

Regards,
Jim

jmathies
11-29-2002, 09:27 AM
Note, we solved this - he was using three windows and calling cpwPostRedisplay() on mouse events for one of them. This effectivly sent a redraw event to every one of his windows on every mouse move event.

When working with multi-windows apps in Cpw, you should always call cpwPostWindowRedisplay() to send a redraw event directly to the window that needs it.

Jim