Microsoft DirectX 8.1 (Visual Basic)

Direct3DDevice8.GetBackBuffer

Retrieves a back buffer from the device's swap chain.

object.GetBackBuffer( _ 
    BackBuffer As Long, _ 
    BufferType As CONST_D3DBACKBUFFERTYPE) As Direct3DSurface8

Parts

object
Object expression that resolves to a Direct3DDevice8 object.
BackBuffer
Index of the back buffer object to return. Back buffers are numbered from 0 to the total number of back buffers - 1. A value of 0 returns the first back buffer, not the front buffer. The front buffer is not accessible through this method.
BufferType
Stereo view is not supported in DirectX 8.0, so the only valid value for this parameter is D3DBACKBUFFER_TYPE_MONO.

Return Values

A Direct3DSurface8 object, representing the returned back buffer surface.

Error Codes

If BackBuffer exceeds or equals the total number of back buffers, an error is raised and Err.Number may be set to D3DERR_INVALIDCALL.

For information on trapping errors, see the Microsoft® Visual Basic® Error Handling topic.