views:

149

answers:

1

Hi there.

I've been looking for any solution to draw rubber bands and cursors via OpenGL without redrawing whole window in Windows Vista/7, but can't find anything suitable. Overlay plane approach doesn't seem to be supported widely on all videocards, especially when it comes to dual screen rendering. I found a solution that suggests manipulating front and back buffer, but comments state that in Windows Vista/7 front buffer manipulations tend to fail on some systems. Simple XOR-ing is not suitable, because cursor and rubber-band colors need to be independent from underlying image colors. Any suggestions?

Thanks in advance.

A: 

You could experiment with reading back the buffer (or just parts of it) before drawing the rubber band and use that to fill in behind it. Caveat: Some cards have lousy readback performance so you'd need to test on a variety of cards.

Nathan Kidd