home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!munnari.oz.au!mips!decwrl!elroy.jpl.nasa.gov!swrinde!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!The-Star.honeywell.com!umn.edu!ricci.geom.umn.edu!slevy
- From: slevy@ricci.geom.umn.edu (Stuart Levy)
- Newsgroups: comp.sys.sgi
- Subject: winpop(): executed immediately or ...?
- Message-ID: <1992Aug31.161217.25495@news2.cis.umn.edu>
- Date: 31 Aug 92 16:12:17 GMT
- Sender: news@news2.cis.umn.edu (Usenet News Administration)
- Distribution: na
- Organization: Geometry Center, University of Minnesota
- Lines: 42
- Nntp-Posting-Host: ricci.geom.umn.edu
-
- I've been playing with taking snapshots (using system("scrsave ..."))
- of our program's graphics windows. In order to ensure that the window
- isn't obscured when its snapshot is taken, I call winpop(), then
- force the window to be redrawn, then invoke scrsave.
-
- (This is all using old-style GL, not GLX. The program is linked under 3.3.2.)
-
- I've had several problems with this:
- scrsave often seems to snap the *back* buffer, not the
- front buffer, in double-buffered mode (under 4.0.1).
- I'm not certain whether it always does this.
-
- I can tell it's doing that by looking at the snapshotted
- SGI image and comparing it with (a) the stuff visible in the
- running program's window and (b) the data shown by
- /usr/demos/bin/snoop in front- and back-buffer modes.
-
- So now I switch to singlebuffered mode (singlebuffer(); gconfig();),
- draw the image, then use scrsave. This is a Good Thing anyway on
- machines which have to dither in RGB mode.
-
- Unfortunately, now I'm finding that even the sequence
- winpop();
- singlebuffer(); gconfig();
- <draw world>
- gflush();
- system("scrsave ...");
- often doesn't effectively pop the window to the top before drawing.
- A ghost of the old topmost window remains. If I stop in the debugger after
- winpopping but before drawing, the window seems to be popped correctly.
-
- I imagine the winpop() is sending a hint to the window manager,
- so the window will be popped at some indefinite near-future time.
-
- Is there any reliable way to know when the window has been popped?
- (I could await the REDRAW event, but if the window was already unobscured,
- would I ever get one?)
-
- Thanks for any advice,
-
- Stuart Levy, Geometry Center, University of Minnesota
- slevy@geom.umn.edu
-