I am using Opengl to render the scene in Engine. And the application with UI controls are developed using WPF (xaml c#).
I have given up the FBO and pBuffer rendering for two reasons:
- Some of our end user systems do not support this.
- It takes quite some time to get the buffer and set it to the WPF panel’s background. Getting window’s handle and rendering on it directly is much much faster.
I have tried swapping the part of buffer after getting the window’s handle. Have tried the Windows form host and have passed the handle rendering the scene there. Have looked at some sources from Open TK.
Rendering works fine in all these cases. But when there are controls placed on top of the viewing area, I experience several problems.
- In case of windows form host i dont get any mouse event (Have tried placing a transparent layer on top it - failed)
- In all three cases, the engine paints on the entire viewarea, causing the conrols to disappear. We have to refresh the controls - which causes some gray-out effect. As the controls are transparent, some part of the window is affected while refreshing it.
Can anyone help me out in resolving this problem.