Surface Creation by Direct3D Mobile Drivers (Windows Embedded CE 6.0)
1/6/2010
The Microsoft® Direct3D® Mobile driver must create all resources used by the application. The Direct3D Mobile middleware does not emulate surface creation. As a consequence, the driver must manage both system memory buffers and video memory buffers. This also means that the driver is able to enforce its own policy regarding which surfaces may or may not be created. Therefore, the driver must clearly reveal its policy through the capability bits it exposes.
The Direct3D Mobile driver model does not allow a driver to reveal differing capabilities based on a particular display mode or pixel format. If a driver claims that it is capable of creating one type of surface format, then it must be able to create that format regardless of the current display mode or format.
All resource creation and deletion is done through the driver's D3DM_CreateSurface and D3DM_DestroySurface functions. Once the middleware determines that a surface is no longer needed, it calls the driver's D3DM_DestroySurface functions to instruct the driver to free the resources.
As part of surface creation, the display driver must assign a handle value to the surface. Because the middleware will use this value to refer to the surface for later operations, the handle must be unique. The handle value of zero is reserved and cannot be used because the middleware uses zero to identify the clearing operation on the current surface.
The following topics provide information about specific surface types.
- Back Buffers and Image Surfaces
- Depth and Stencil Buffers
- Front Buffers
- Texture Maps
- Vertex and Index buffers