DragonflightDesign
Resource contributor
- Messages
- 1,390
- Country

Firstly - this ONLY happens in P3Dv4. If compiled to 32-bit and launched in FSX, no problems.
I have a gauge that draws the background (MAKE_STATIC) and two MAKE_ICONS that add two bitmaps to represent night lighting when the cockpit lights are turned on. All instruments and swicthes have the required 'night-lit' additional bitmaps that are switched in with the cockpit lights being turned on. All bitmaps involved in the cockpit lighting have the IMAGE_USE_BRIGHT flag applied in the gauge update callback when the cockpit lights are turned on.
Initial summary: the cockpit light are turned on, the 'lit' bitmaps are all switched in and the IMAGE_USE_BRIGHT flag applied. Reverse for cockpit lights off.
What happens: for between 1 and 10 actions on the lights switch, all works perfectly.
Between 8 and 10 clicks, the following always happens when the lights are turned on:
- The background bitmap lights up and overwrites all the other bitmaps i.e. I see the background only
- All gauges that are constantly updated (e.g. airspeed) immediately reappear
- All switches remain invisible until I click on the relevant area and then they reappear (sometimes just one, sometimes more than one. It depends if they are grouped. For example, the overhead panel switches will all reappear if I click one because they are all in the same gauge).
- P3Dv4 fails to draw transparency i.e. I get big black rectangles on screen.
Turn the lights off and everything reappears correctly (lights off etc.).
Four days later...
It's obviously a redraw problem but introducing SET_OFFSCREEN into the equation to force a redraw does nothing for the problem.
Anyone...?
I have a gauge that draws the background (MAKE_STATIC) and two MAKE_ICONS that add two bitmaps to represent night lighting when the cockpit lights are turned on. All instruments and swicthes have the required 'night-lit' additional bitmaps that are switched in with the cockpit lights being turned on. All bitmaps involved in the cockpit lighting have the IMAGE_USE_BRIGHT flag applied in the gauge update callback when the cockpit lights are turned on.
Initial summary: the cockpit light are turned on, the 'lit' bitmaps are all switched in and the IMAGE_USE_BRIGHT flag applied. Reverse for cockpit lights off.
What happens: for between 1 and 10 actions on the lights switch, all works perfectly.
Between 8 and 10 clicks, the following always happens when the lights are turned on:
- The background bitmap lights up and overwrites all the other bitmaps i.e. I see the background only
- All gauges that are constantly updated (e.g. airspeed) immediately reappear
- All switches remain invisible until I click on the relevant area and then they reappear (sometimes just one, sometimes more than one. It depends if they are grouped. For example, the overhead panel switches will all reappear if I click one because they are all in the same gauge).
- P3Dv4 fails to draw transparency i.e. I get big black rectangles on screen.
Turn the lights off and everything reappears correctly (lights off etc.).
Four days later...
It's obviously a redraw problem but introducing SET_OFFSCREEN into the equation to force a redraw does nothing for the problem.Anyone...?

