## Presentation Device Driver Reference for OS/2

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

### Presentation Driver Interface

The internal Presentation Driver interface is comprised of a set of graphics engine (Grexxx) functions that are called through a dispatch table . A dispatch table is an array of pointers to function-handling routines. The low-order byte of the function number identifies the member of the array that contains the pointer for the function. The functions called through the dispatch table fall into three main groups:

Functions that all presentation drivers must support. See Mandatory Functions for All Drivers.

Functions that must be supported by display drivers. See Mandatory Functions for Display Drivers.

Functions that are supported by simulations in the graphics engine. See Simulated Functions.

The first instance of a loaded presentation driver is given a copy of the default dispatch table. The Enable routine in the presentation driver modifies this copy so that, for those functions supported in the driver, the pointers address the function-handling routines of the presentation driver.

When the function is called a second time (or any time thereafter) for the same presentation driver, a NULL dispatch table pointer can be given because the graphics engine already has the table correctly initialized. It is therefore not necessary to reinitialize the table.