Opengl with Motif

I currntly using opengl with motif. I had this problem of having the image being corrupted every time when it is being overlapped by another window. Is there a way to prevent the image for being corrupted without re-rendering the image as it will take a long time. please help. Thanks you

Nope - that’s the way it works. You can try getting the specific rectangle that was damaged and just re-drawing that portion, but that’s usually more trouble than it’s worth… it depends on the complexity of your scene. If you’re using display lists, on most systems it’s probably better (and certainly easier) to just redraw the scene. It’s the same thing that happens on most systems when menus popup over the GL area.


hi chennes,

thanks for your reply. Actually I had try using double buffers, it work well with menu popup and text window (text editor). however, some windows(like explorer, web browser, etc) still corrupted the image. Any ideal why this is happening?

It is my impression of the way things work that there is no guarantee that your back buffer will be uncorrupted by another application, similar to the way the front buffer gets messed up when you drag a windo over it. Perhaps the web browser uses the back buffer for something as well, and corrupts that. It is generally a bad idea to count on the back buffer being there the do your redraws - you should redraw the contents of the back buffer and then swap every time.


This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.