DirectX: the order of the game loop, first draw and then process the input?

I just read the DirectX documentation and met something interesting on the IDirect3DDevice9 :: BeginScene page :

To enable maximum parallelism between the processor and the graphics accelerator, it is advantageous to call IDirect3DDevice9 :: EndScene , as far ahead of the calling gift as possible.

I'm used to writing my game loop to process input, etc., and then draw. Do I have it back? Perhaps the game loop should be something like this: (semi-pseudo-code, obviously)

while(running) {
    d3ddev->Clear(...);
    d3ddev->BeginScene();
    // draw things
    d3ddev->EndScene();

    // handle input
    // do any other processing
    // play sounds, etc.

    d3ddev->Present(NULL, NULL, NULL, NULL);
}

According to this documentation proposal, this loop will “include maximum parallelism”.

? ? ... , - - , - , - ?

+5
3

, "" , , , , "" . .

while True:
   Simulate()
   FlipBuffers()
   Render()

( , ), , (), , .

+2

- , . God of War III PS3:

http://www.tilander.org/aurora/comp/gdc2009_Tilander_Filippov_SPU.pdf

30 , 1/30 ~ = 0,033 , ( , 0,1 100 ).

+2

, BeginScene EndScene . , , , . , . , .

, .

, , , . , , , , , .

+2

All Articles