Adam D
Adam D

Reputation: 301

Transparent window above OpenGL

My application have OpenGL Engine in a WPF hosted Window. I created half-transparent widget (as Window object) that should display content above OpenGL window. Sometimes when application processing data, widgets backgrounds becomes black (see attached image). Does anybody know what it is. How can I resolve this problem.enter image description here

Upvotes: 3

Views: 1676

Answers (2)

datenwolf
datenwolf

Reputation: 162164

Since Vista, Windows supports a new PIXELFORMATDESCRIPTOR flag PFD_SUPPORT_COMPOSITION. If this flag is set, new OpenGL contexts created from HDCs of windows configured with this flag will integrate into the desktop composition system.

Upvotes: 3

Nicol Bolas
Nicol Bolas

Reputation: 473184

It's not guaranteed to work at all. OpenGL windows are not composited with WPF transparency, either below or above. It may work sometimes, but it doesn't have to.

Upvotes: 0

Related Questions