PDA

View Full Version : Improving Zoom Box performance



SED
07-02-2000, 07:47 AM
Ive coded a Zoom Box routine for my app, it works very well. The only thing I dont like about it, is the corner of the box lags behind the cursor. Its really only noticable if you're looking for it, but...

Would anyone be willing to look at my code to see where I might improve its performance. I could post just the logic, render, ect functions. I've only been using OpenGL a few months so I would appriciate the help.

07-02-2000, 02:45 PM
Hey there,

I've done a zoom box once, and maybe this could help you; the way I did it was by using the XOR option in draw mode, which allows me not to use glutPostRedisplay(), so if the scene is quite complex, the only thing drawn is your zoom box, because nothing else moves.

Moose

SED
07-02-2000, 03:12 PM
Thats something I was wondering about, in a round about way. The render code for the box is called from the paint func. If I could make the box render locally that would shurly help. Thanks Moose, I'll look up the boolean masks.

SED
07-04-2000, 06:29 AM
Thanks a bunch, Moose.
Works much better now.

07-05-2000, 11:16 AM
Glad I could help, even if just a little.