
GPU Computing 203
while ( application has idle time)
{
clear
color and depth stencil buffers ;
issue
drawing commands ;
swapChain−>Present ( syncInterval , flags ); // Swap buffers .
}
The Present call is for D3D11.0. When the syncInterval is set to zero, the
buffers are presented to the display immediately without synchronization to
vertical blanking. A value of 1, 2, 3, or 4 allows you to wait for vertical blanking
the specified number of times. For example, if you have a 60 Hz monitor—
and assuming you can draw your scene at 60 Hz, a
syncInterval value of 1 will
present the back buffer at 60 Hz. If the drawing takes less than 1/60 of a
second, the
Present