| Home
| Previous
| Next
| Up

gmode_t

Declaration

typedef struct {
int xRes;
int yRes;
int bitsPerPixel;
color_t maxColor;
int maxPage;
int bytesPerLine;
int aspectRatio;
long pageSize;
int scratch1;
int scratch2;
int redMaskSize;
int redFieldPosition;
int greenMaskSize;
int greenFieldPosition;
int blueMaskSize;
int blueFieldPosition;
int alphaMaskSize;
int alphaFieldPosition;
ulong modeFlags;
ulong bitmapStartAlign;
ulong bitmapStridePad;
} gmode_t

Prototype In

mgraph.h

Description

Structure representing the attributes for a specific video mode. This structure is also used to store the rendering dimentions for all device context surfaces in the MGLDC structure.

Note that when the mode is a color index display mode, the redMaskSize and redFieldPosition hold the location and size of the color index value within the pixel.

Members

xRes | Device x resolution - 1
yRes | Device y resolution - 1
bitsPerPixel | Pixel depth
maxColor | Maximum color for device - 1
maxPage | Maximum number of hardware display pages - 1
bytesPerLine | Number of bytes in a single device scanline
aspectRatio | Device pixel aspect ratio ((horiz/vert) * 1000)
pageSize | Number of bytes in a hardware display page
scratch1 | Internal scratch value
scratch2 | Internal scratch value
redMaskSize | Size of RGB red mask (also color index)
redFieldPosition | Number of bits in RGB red field (also color index)
greenMaskSize | Size of RGB green mask
greenFieldPosition | Number of bits in RGB green field
blueMaskSize | Size of RGB blue mask
blueFieldPosition | Number of bits in RGB blue field
alphaMaskSize | Size of RGB alpha mask
alphaFieldPosition | Number of bits in RGB alpha field
modeFlags | Flags for the mode
bitmapStartAlign | Linear offscreen bitmap start alignment in bytes
bitmapStridePad | Linear offscreen bitmap stride pad in bytes

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