Can’t really help you on the overlay planes because I haven’t done anything with them.
Maybe rendering your text and lines into the pbuffer, binding it to a texture, and rendering a quad with that texture over your main output would solve your problem?
We use Text and graphics overlays onto screens all the time, however, we do not use overlay planes, we sort the graphics ourselves and draw it all in the primary plane:
SetPerspective
DrawUnderlay w/o zbuff write
DrawUnderlay2 w/zbuff write
DrawMainScene
Clear Zbuff
setOrtho
DrawOverlay
SwapBuffers & Clear (e.g. set up for next frame)
How much performance are you looking for??
It’s complicated, but it gets the job done, and we are getting about 50fps on our old app, 90 on the new one I am working on. Even more on the Geforce4, but those numbers are for the QuadroDCC, about 35fps on our old Quadro2’s.
Have you considered using the stencil buffer to mask the drawing in the main plane in such a way that the ‘overlay’ information stays visible without having to draw it again?
Don’t know if its quicker, but maybe its worth a try.
The problem with either a sorted approach or a stencil approach is that both the main display and the overlay need to be updated in real-time.
If the main display was refreshed in it’s entirety every update, a sorted approach (or indeed a stencil approach) would work well. However, only a small part of the display is updated (1 radial ~ 0.7 degrees) per “frame”. A whole sweep needs to happen in ~2 seconds. The overlay needs to be doublebuffered (if possible) and updated dynamically (since it’s sort of a gui in nature).
I have some other options but wondered if any driver settings, registry tweaks etc. would have any bearing on how fast overlays work.
what kind of improvements have you done for text acceleration? We have made up most of our speed in accelerating text annotation (heads-up display, and in-scene annotation). Have you tried testing the overlay without text in it to see if it is the presence of the overlay, or the text inside it that is causeing the slowdown?