CWP getting VERY slow on multiply window

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…

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

How can I include the program in the reply?Thanks,
Oren Shapir.

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

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

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