| Home
| Previous
| Next
| Up

MGLDC

Declaration

typedef struct {
attributes_t a;
void *surface;
gmode_t mi;
pixel_format_t pf;
color_t *colorTab;
void *userData;
} MGLDC

Prototype In

mgraph.h

Description

Structure representing the public structure of all MGL device contexts. You can use the information in this structure to directly access the device surface for developing your own custom rendering code with the MGL.

Note: The size of an MGLDC structure is a lot bigger internally that is declared in this header file, as we only expose the core information necessary for application programs that does not change from release to release. Internally the MGL deals with an expanded structure that contains all the information.

Members

a | Current device attributes
surface | Pointer to device surface. This pointer will be a pointer to the start of framebuffer memory for the device context.
mi | Mode attribute information for the device
pf | Current pixel format for the device context.
colorTab | Color lookup table cache for the device context. In color index modes this is an array of 256 palette_t structures that represent the color palette for the device context. In 15-bits per pixel and higher modes, this is an array of 256 color_t values which contains a lookup table with pre-packed color values for the current display mode. This is used by the MGL when translating color index bitmaps and drawing them in RGB display modes.
userData | Arbitrary pointer to user defined data. This allows the application programmer to store their own user defined data in the MGLDC structure, or via an object attached to the MGLDC structure.

Copyright © 2002 SciTech Software, Inc. Visit our web site at http://www.scitechsoft.com