JRGlide
03-16-2006, 12:22 PM
I have an MFC Open GL project where I display GL in the client window, but I would like to sometimes display a child window in the corner of the window to show additional information. This in itself works fine.
The problem I am having is that the child window flickers badly each time the GL window is update (eg, when being rotated). The GL window works fine. My first attempt to solving this was to declare the parent and GL windows with the WS_CLIPCHILDREN and WS_CLIPSIBLINGS since that is suppose to prevent Windows from drawing in the child window during redraw - but that doesn't work. My assumption of why this isn't working is that GL is writing to the window directly and bypassing Windows. But maybe thats a bad assumption.
My next idea was to define a clipping region in GL to exclude the child window - in effect defining an L-shaped output window for GL. That didn't work either, mostly because there doesn't seem to be a way to do that. glViewPort only allows you to define a rectangular window, and I can't find any commands that allow you to exclude a portion of the output window.
Does anyone have any ideas? Thank you for your help.
The problem I am having is that the child window flickers badly each time the GL window is update (eg, when being rotated). The GL window works fine. My first attempt to solving this was to declare the parent and GL windows with the WS_CLIPCHILDREN and WS_CLIPSIBLINGS since that is suppose to prevent Windows from drawing in the child window during redraw - but that doesn't work. My assumption of why this isn't working is that GL is writing to the window directly and bypassing Windows. But maybe thats a bad assumption.
My next idea was to define a clipping region in GL to exclude the child window - in effect defining an L-shaped output window for GL. That didn't work either, mostly because there doesn't seem to be a way to do that. glViewPort only allows you to define a rectangular window, and I can't find any commands that allow you to exclude a portion of the output window.
Does anyone have any ideas? Thank you for your help.