?/TD>
Microsoft DirectX 9.0

ID3DXLine::Begin Method


Prepares a device for drawing lines.

Syntax

HRESULT Begin(VOID);

Return Value

If the method succeeds, the return value is D3D_OK.

If the method fails, the return value can be one of the following values.

D3DERR_INVALIDCALLThe method call is invalid. For example, a method's parameter may have an invalid value.
D3DXERR_INVALIDDATAThe data is invalid.


Remarks

Calling Begin is optional. If called outside of a Begin/ID3DXLine::End sequence, the draw functions will internally call Begin and End. To avoid extra overhead, this method should be used if more than one draw function will be called successively.

This method must be called from inside an IDirect3DDevice9::BeginScene and IDirect3DDevice9::EndScene sequence.

Begin cannot be used as a substitute for either IDirect3DDevice9::BeginScene or ID3DXRenderToSurface::BeginScene.



© 2002 Microsoft Corporation. All rights reserved.