DDGPESurf Constructors (Compact 2013)
3/26/2014
The DDGPESurf object has overridden several of the constructors for the GPESurf object, to add functionality.
Syntax
DDGPESurf(
int width,
int height,
void* pBits,
int stride,
EGPEFormat format
);
DDGPESurf(
int width,
int height,
void* pBits,
int stride,
EGPEFormat format,
EDDGPEPixelFormat pixelFormat
);
DDGPESurf(
int width,
int height,
int stride,
EGPEFormat format,
EDDGPEPixelFormat pixelFormat
);
DDGPESurf(
int width,
int height,
EGPEFormat format
);
Parameters
- width
Width requested for the surface, in pixels.
- height
Height requested for the surface, in pixels.
- pBits
Pointer allocated for the graphic data of the surface. If the pBits parameter is not passed into the constructor, the DDGPESurf object allocates system memory for the data of that surface.
- stride
Stride requested for the surface.
- format
Format requested for the surface.
- pixelFormat
Pixel format requested for the surface.
Return Values
None.
Remarks
When your driver creates a surface, it must not create a DDGPESurf object directly. Instead, you must define your own surface object that derives from DDGPESurf. To add hardware-specific or driver-specific functionality, you can add new constructors and possibly override one or more of the existing constructors.
If your surface object calls one of the DDGPESurf constructors without supplying a pointer to memory that has been allocated for the graphic information of the surface, DDGPESurf will automatically allocate system memory for you. The DDGPESurf destructor will free any memory allocated by the DDGPESurf constructors.
To use one of the DDGPESurf constructors, your display driver code must enforce the data alignment requirements of the microprocessor for your device. Additionally, the allocated surface must be DWORD (32 bit) aligned, even for a source or destination surface with a pixel depth of 8 or 16 bits per pixel (bpp). Otherwise, the constructor may throw an exception or cause a downstream exception.
Requirements
Header |
ddgpe.h |
Library |
Ddgpe.lib |