?/TD> |
Microsoft DirectX 9.0 |
Begins a scene.
Syntax
HRESULT BeginScene(VOID);
Return Value
If the method succeeds, the return value is D3D_OK.
The method will fail with D3DERR_INVALIDCALL if BeginScene is called while already in a BeginScene/EndScene pair. This happens only when BeginScene is called twice without first calling EndScene.
Remarks
Applications must call this method before performing any rendering and must call IDirect3DDevice9::EndScene when rendering is complete and before calling IDirect3DDevice9::BeginScene again.
If the IDirect3DDevice9::BeginScene method fails, the device was unable to begin the scene, and there is no need to call the IDirect3DDevice9::EndScene method. In fact, calls to IDirect3DDevice9::EndScene will fail if the previous call to IDirect3DDevice9::BeginScene failed.
See Also
IDirect3DDevice9::EndScene