Microsoft DirectX 8.1 (Visual Basic)

Direct3DDevice8.BeginScene

Begins a scene.

object.BeginScene()

Parts

object
Object expression that resolves to a Direct3DDevice8 object.

Error Codes

If the method fails, an error is raised and Err.Number can be set to D3DERR_INVALIDCALL.

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

Remarks

Applications must call this method before performing any rendering and must call Direct3DDevice8.EndScene when rendering is complete and before calling BeginScene again.

If the BeginScene method fails, the device was unable to begin the scene, and there is no need to call the Direct3DDevice8.EndScene method. In fact, calls to EndScene fail if the previous call to BeginScene failed.

See Also

Direct3DDevice8.EndScene