Mail Archives: djgpp/1994/05/31/11:40:28
On Tue, 31 May 1994, Gamble C O wrote:
> Hi all,
> I am using the GRX graphics package and I am writing a rendering program. At the moment it draws wireframes, constant shaded and Gouraud shaded objects.
> I would like to be able to grab the screen somehow (temporarily), then print
> up some info, help, etc. and then restore the screen to its original picture.
>
> Is there a quick, easy way to do this using GRX?
>
> Any help much appreciated, many thanx in advance.
>
Use GrCreateContext() to create a new context that is the same
dimensions as the screen (GetMaxX(), GetMaxY()). Then you can use
GrBitBlt to copy the entire screen to your new context. After the screen
is saved to the new context, you can draw to the screen context.
When you want to restore the screen to its original state, do a
GrBitBlt() back to the screen.
If I remember correctly, you use NULL to designate the current
context in GrBitBlt(), and you can use GrSetContext(NULL), to select the
physical screen for drawing. All of this works very nicely! (way to go
Csaba :)
Ed
/****************************************************************************/
/* Ed Phillips flaregun AT strauss DOT udel DOT edu University of Delaware */
/* Jr Systems Programmer (302) 831-6082 CNS/Network and Systems Services */
/****************************************************************************/
- Raw text -