## Presentation Device Driver Reference for OS/2

[prev][next][parent][TOC]

### InnerGre Macros

For each Gre32Entry there is also an InnerGre32Entry. Some 32-bit hardcopy drivers call both the standard GRE entries as well as the InnerGre entry. These hardcopy drivers use a shadow device context, which is an OD_MEMORY device context in the currently installed display driver, to assist with rasterization. When called to perform a drawing function, these hardcopy drivers relay the work to the shadow DC (thus the display driver) by substituting the hardcopy DC handle with the shadow DC handle and calling the appropriate engine entry. This style of hardcopy driver coding made necessary the InnerGre entries.

The InnerGre entries differ from normal GRE entries in these ways:

For the InnerGre entries, the graphic engine does not reload the command flags parameter (the last parameter). Instead, the engine uses the command flags parameter exactly as supplied by the caller.

The graphics engine will not transform coordinates when called at the InnerGre level. The InnerGre entries always expect device coordinates.

The graphics engine does not perform validation on the supplied device context handle when called at the InnerGre level.

The Developer's Toolkit for OS/2 does not provide an include file for InnerGre macros. Refer to to INNERGRE.H in the MiniDriver code sample in the IBM Device Driver Source Kit for OS/2, (Version 1.1 or higher). The MiniDriver is an example of a hardcopy driver that uses a shadow device context.