Is there a significant savings derived from blitting to and from the same surface?
Not that I know of. Mass-blitting from the same texture has significant performance gains, because you only have to lock and free them once, but orbiter doesn't allow that level of control. I assume that it just locks and frees the texture for every single opperation.
For optimising blitting operations, the main thing you can do is reduce the actual ammount of operations. blitting two small areas takes more cycles than blitting a single large one (especially with Orbiters high-level approach). As such, make sure that you only blit the actual things that change. All static text, for example, doesn't need to be blitted every frame, but only the values that actually do change (most prominently numbers, I assume).
Then there's another trick, which is a bit work intensive: Instead of blitting, you can change texture coordinates. Say you have for example a blinking light, it is more efficient to change the texture coordinates of the element between the on and off texture coordinates than blitting the images onto the element. This can also be done with numbers displays if things get really wild, although it's quite a bit of work.
In the end,y ou should really think about what elements do really have to update every timestep. even reducing it to every 0.1 seconds or so already brings a huge improvement, and is usually enough (in many cases, it is even better readable, because fast-changing numbers aren't easy on the eye).
And then there's of course also the possibilities to check if the displayed value has actually changed by a significant enough ammount, and only blitting in those cases. There's a lot of values on which you might need to have a constant watch, because you can not foresee when they will change, and the easiest way to do that is to reblit them every frame... but with a bit more effort you can just check if they actually need redrawing.
- if you are under the inline client, avoid BitBlt(). Instead, cast SURFHANDLE to LPDIRECTDRAW7SURFACE and blit using DX7 functions.
- if you are running under D3D9Client, just use BitBlt()
Uhm... we can use standard DX functions in Orbiter? I must admitt the thought never occured to me. I guess it should work when you include the DX sdk in your project.