D3DRMIMAGE

Describes an image that is attached to a texture by the IDirect3DRM::CreateTexture method. IDirect3DRMTexture::GetImage returns the address of this image.

typedef struct _D3DRMIMAGE {

int width, height;

int aspectx, aspecty;

int depth;

int rgb;

int bytes_per_line;

void* buffer1;

void* buffer2;

unsigned long red_mask;

unsigned long green_mask;

unsigned long blue_mask;

unsigned long alpha_mask;

int palette_size;

D3DRMPALETTEENTRY* palette;

}D3DRMIMAGE;

typedef D3DRMIMAGE, *LPD3DRMIMAGE;

Members

width and height

Width and height of the image, in pixels.

aspectx and aspecty

Aspect ratio for nonsquare pixels.

depth

Bits per pixel.

rgb

If this member FALSE, pixels are indices into a palette. Otherwise, pixels encode RGB values.

bytes_per_line

Number of bytes of memory for a scan line. This value must be a multiple of four.

buffer1

Memory to render into (first buffer).

buffer2

Second rendering buffer for double buffering. Set this member to NULL for single buffering.

red_mask, green_mask, blue_mask, and alpha_mask

If rgb is TRUE, these members are masks for the red, green, and blue parts of a pixel. Otherwise, they are masks for the significant bits of the red, green, and blue elements in the palette. For example, most SVGA displays use 64 intensities of red, green, and blue, so the masks should all be set to 0xfc.

palette_size

Number of entries in the palette.

palette

If rgb is FALSE, this member is the address of a D3DRMPALETTEENTRY structure describing the palette entry.

See Also

IDirect3DRM::CreateTexture, IDirect3DRMTexture::GetImage