Complex Surfaces and Attachments
Surfaces can be complex, which means that they are part of a larger collection of associated surfaces. Examples of complex surfaces include the front buffer and associated back buffers, the various levels of a MIP map, and the various faces of a cube map.
The DirectDraw runtime uses a concept known as surface attachments to manage the linking of different simple surfaces into complex surfaces. Surfaces can be attached implicitly, as when the application makes one call to IDirectDraw7::CreateSurface to build a flipping chain (front buffer and back buffers with a possible Z-buffer); or explicitly, as when the application associates a Z-buffer with a render target by calling IDirectDrawSurface7::AddAttachedSurface.