티스토리 뷰
Begins a scene.
Syntax
HRESULT BeginScene();
Parameters
This method has no parameters.
Return value
Type: HRESULT
If the method succeeds, the return value is D3D_OK. The method will fail with D3DERR_INVALIDCALL if IDirect3DDevice9::BeginScene is called while already in a IDirect3DDevice9::BeginScene/IDirect3DDevice9::EndScene pair. This happens only when IDirect3DDevice9::BeginScene is called twice without first calling IDirect3DDevice9::EndScene.
Remarks
Applications must call IDirect3DDevice9::BeginScene before performing any rendering and must call IDirect3DDevice9::EndScene when rendering is complete and before calling IDirect3DDevice9::BeginScene again.
If IDirect3DDevice9::BeginScene fails, the device was unable to begin the scene, and there is no need to call IDirect3DDevice9::EndScene. In fact, calls to IDirect3DDevice9::EndScene will fail if the previous IDirect3DDevice9::BeginScene failed. This applies to any application that creates multiple swap chains.
There should be one IDirect3DDevice9::BeginScene/IDirect3DDevice9::EndScene pair between any successive calls to present (either IDirect3DDevice9::Present or IDirect3DSwapChain9::Present). IDirect3DDevice9::BeginScene should be called once before any rendering is performed, and IDirect3DDevice9::EndScene should be called once after all rendering for a frame has been submitted to the runtime. Multiple non-nested IDirect3DDevice9::BeginScene/IDirect3DDevice9::EndScene pairs between calls to present are legal, but having more than one pair may incur a performance hit. To enable maximal parallelism between the CPU and the graphics accelerator, it is advantageous to call IDirect3DDevice9::EndScene as far ahead of calling present as possible.
Requirements
Header |
|
---|---|
Library |
|
See also
https://msdn.microsoft.com/en-us/library/windows/desktop/bb174350(v=vs.85).aspx
'ComComComCom > DX .. D3D' 카테고리의 다른 글
[function] IDirect3DDevice9::Present (0) | 2017.06.17 |
---|---|
[function] IDirect3DDevice9::EndScene (0) | 2017.06.17 |
[function] IDirect3DDevice9::Clear (0) | 2017.06.17 |
[fucntion] Direct3DCreate9 (0) | 2017.06.12 |
크라메르 법을 이용한 역행렬, 가우시안법을 이용한 역행렬 퍼포먼스 비교한 글 캡쳐 (0) | 2017.06.11 |