0

Correct me if I am wrong, but isn't WS_CLIPCHILDREN supposed to stop parent window from drawing over its children window? I have a parent window with two child windows, yet whenever I move the parent window, strangely enough one of the child's window content is always invalidated. Is this because I am using openGL to draw the content within the window? A post here seemed to suggest the lack of respect in one toward the other.

EDIT1 I have found my flaw. Tried changing window background to other colours only to note that some background section of the window failed to comply with the change. It turned out that the value I use to clear my OpenGL color buffer bit had been wrong, hence making my window showing black all the time.

So the real issue now is, why isn't my textured quad render? I have already bound it. Depth test and alpha test are also disabled. The coordinate for texture and vertex are corrected. The viewport is also set to be that of the window, and the projection matrix and modelview matrix are both reset. Other windows that use the same logic seemed to work fine enough.

null
  • 63
  • 6
  • What exactly are you trying to do here? Do you have Win32 controls overlapping the same region as your OpenGL render context? _That is the situation the link you posted describes._ I would be hesitant to mix and match GDI and OpenGL this day and age; Microsoft is not fond of either technology anymore. They would prefer it if all new software used WPF and Direct3D as impractical as that may be. Apple is the same way with their not-so-gentle persuasion to use the Objective C GUI frameworks :) – Andon M. Coleman Sep 06 '13 at 16:52
  • @AndonM.Coleman I have three windows. Each is with its own rendering context whereas two of them are children to the first. Each window's content is rendered using opengl. The parent window has WS_CLIPCHILDREN style assigned, and all the children have WS_CLIPSIBBLINGS set. The strange thing is whenever I move the parent window, the content in one of the child windows seemed to always be invalidated (it turned all black). :/ – null Sep 08 '13 at 07:23

0 Answers0