seth@miro.Berkeley.EDU (Seth Teller) (11/30/90)
well, as usual my posting on this wasn't clear, and it's generated confusion. i apologize. psgl is like an exception routine that sits in your gl program. you can link it in always-- your program will run the same, but with a small speed penalty. when you press a special key sequence (ctrl-shift-printscrn), the exception routines are enabled, and psgl does a qenter (REDRAW, 1). the intent of this is to force the client to refresh the screen. the graphics calls invoked to do this are caught. when your code calls swapbuffers(), the items are sorted back to front and written to a file. finally, the exception routines disable themselves and you can keep using your program normally. so: to use psgl successfully, your program must: you have to call qread() in a loop [to cause the ctrl-shift-printscrn to be caught] you have to refresh upon receipt of a REDRAW event [to cause the rigged graphics calls to be invoked] you have to call swapbuffers() when done [to write the postscript file and disable the rigged routines] i realize there are lots of programs that just open a window and draw something with no event loop. perhaps psgl should be modified to write the file on gexit(), as well... but does everyone call that, or any other gl routine, reliably? you see the problem. seth