PDA

View Full Version : Help regarding rubberbanding...



Ali
07-05-2007, 12:01 AM
hey...
I have implemented basic rubberband drawing but at the moment I am refreshing the complete drawing whenever a new item is added or mouse is moved. however it will not be possible to do so when application get bigger...
how to remove only the trails of mouse motion and eradicate the need of refreshing the entire diagram..since not expereinced in graphics programming need you help urgently

thanks

ZbuffeR
07-05-2007, 01:32 AM
Copy your drawing to texture before starting the rubberband : you can use glCopyTexSubImage (basic and simple, but does not work if window is partially covered by another for instance), pbuffers (old and clumsy) or FBO (http://www.opengl.org/registry/specs/EXT/framebuffer_object.txt) .

Then simply draw a textured quad with this texture when doing interactive rubberbanding.

Ali
07-08-2007, 04:11 AM
Thanks for the reply.
What about using XOR operation?
thanks

ZbuffeR
07-08-2007, 04:43 AM
forget it.

Ali
07-09-2007, 08:39 AM
Please explain..I have seen tutorials that suggesty it
thanks for the help