Microsoft DirectX 8.0 (Visual Basic)

Surface Interfaces

A surface represents a linear area of display memory. A surface usually resides in the display memory of the display card, although surfaces can exist in system memory. Surface objects are contained in the Direct3DSurface8 object.

A Direct3DSurface8 class is obtained by calling one of the following methods.

•    Direct3DTexture8.GetSurfaceLevel

The Direct3DSurface8 object enables you to indirectly access memory through the Direct3DDevice8.CopyRects method. This method allows you to copy a rectangular region of pixels from one Direct3DSurface8 object to another specified rectangular region on another Direct3DSurface8 object. The surface object also has methods to directly access display memory. For example, you can use the Direct3DSurface8.LockRect method to lock a rectangular region of display memory. It is important to call Direct3DSurface8.UnlockRect after you are done working with the locked rectangular region on the surface.