Hardware overlay problem.

Hey.

I’m working on a project which uses a hardware overlay plane. We initialize two drawables, both are RGB. One draws on the main plane (plane 0) and the other draws on the overlay plane (plane 1).

The project runs on a linux machine with Quadro FX 1300 card and the latest nVidia drivers.

The program works normally except one special case. If before the program opens a window and initializes the drawables I switch to a virtual console (using Ctrl+Alt+Fn) and after the window has been opened I switch back to X (using Ctrl+Alt+F7) the whole image is rendered using the same color (it should be colorful, not monotone).
If we’re not using an overlay plane in hardware (we can also emulate overlay) this does not happen.

If anybody has encountered this problem and knows how to solve it i’ll be glad to hear your solution.