Sign in to follow this  
xmind

OpenGL WS_EX_LAYERED & OpenGL

Recommended Posts

Any window created with WS_EX_LAYERED style with translucency which upon any OpenGL render have strange flickering. Have any recomendations? Thanks for advice.

Share this post


Link to post
Share on other sites
From what I understand, other people have done this by rendering the GL scene to a offscreen buffer (FBO), then use glReadPixels, then use Biblt to the windows.
So you need to use some WinAPI function. Directly rendering to backbuffer and SwapBuffers won't do. I have such a demo on my hard drive but I don't have the source code.

Share this post


Link to post
Share on other sites
Have you declared the Classstyle as OwnDC? It should not be ParentDC or ClassDC if you plan to use WS_LAYERED (I'd assume WS_EX_LAYERED is the same).

Share this post


Link to post
Share on other sites
http://msdn2.microsoft.com/en-us/library/ms632680.aspx

WS_EX_LAYERED
Windows 2000/XP: Creates a layered window. Note that this cannot be used for child windows. Also, this cannot be used if the window has a class style of either CS_OWNDC or CS_CLASSDC.

Share this post


Link to post
Share on other sites
http://groups.google.com/group/microsoft.public.win32.programmer.gdi/msg/9b5dc176dda33a57?hl=en&lr=&ie=UTF-8&oe=utf-8

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this