(temp);
}
///
/// Gets performance statistics about the last render frame.
///
///
/// You cannot use GetFrameStatistics for swap chains that both use the bit-block transfer (bitblt) presentation model and draw in windowed mode.
You can only use GetFrameStatistics for swap chains that either use the flip presentation model or draw in full-screen mode. You set the value in the SwapEffect member of the structure to specify that the swap chain uses the flip presentation model.
///
///
/// bb174573
/// GetFrameStatistics
/// GetFrameStatistics
/// HRESULT IDXGISwapChain::GetFrameStatistics([Out] DXGI_FRAME_STATISTICS* pStats)
public SharpDX.DXGI.FrameStatistics FrameStatistics
{
get
{
SharpDX.DXGI.FrameStatistics output;
SharpDX.Result result = TryGetFrameStatistics(out output);
result.CheckError();
return output;
}
}
///
/// Gets or sets a value indicating whether the swapchain is in fullscreen.
///
///
/// true if this swapchain is in fullscreen; otherwise, false.
///
/// bb174574
/// HRESULT IDXGISwapChain::GetFullscreenState([Out] BOOL* pFullscreen,[Out] IDXGIOutput** ppTarget)
/// IDXGISwapChain::GetFullscreenState
public bool IsFullScreen
{
get
{
RawBool isFullScreen;
Output output;
GetFullscreenState(out isFullScreen, out output);
if (output != null)
output.Dispose();
return isFullScreen;
}
set
{
SetFullscreenState(value, null);
}
}
///
/// [Starting with Direct3D 11.1, we recommend not to use Present anymore to present a rendered image. Instead, use . For more info, see Remarks.]
Presents a rendered image to the user.
///
/// No documentation.
/// No documentation.
/// Possible return values include: , or (see DXGI_ERROR), (see ), or D3DDDIERR_DEVICEREMOVED.
Note??The Present method can return either or D3DDDIERR_DEVICEREMOVED if a video card has been physically removed from the computer, or a driver upgrade for the video card has occurred.
///
/// Starting with Direct3D 11.1, we recommend to instead use because you can then use dirty rectangles and the scroll rectangle in the swap chain presentation and as such use less memory bandwidth and as a result less system power. For more info about using dirty rectangles and the scroll rectangle in swap chain presentation, see Using dirty rectangles and the scroll rectangle in swap chain presentation.
For the best performance when flipping swap-chain buffers in a full-screen application, see Full-Screen Application Performance Hints.
Because calling Present might cause the render thread to wait on the message-pump thread, be careful when calling this method in an application that uses multiple threads. For more details, see Multithreading Considerations.
| Differences between Direct3D 9 and Direct3D 10: Specifying in the Flags parameter is analogous to IDirect3DDevice9::TestCooperativeLevel in Direct3D 9. |
?
For flip presentation model swap chains that you create with the value set, a successful presentation unbinds back buffer 0 from the graphics pipeline, except for when you pass the flag in the Flags parameter.
For info about how data values change when you present content to the screen, see Converting data for the color space.
///
///
/// bb174576
/// HRESULT IDXGISwapChain::Present([In] unsigned int SyncInterval,[In] DXGI_PRESENT_FLAGS Flags)
/// IDXGISwapChain::Present
public SharpDX.Result Present(int syncInterval, SharpDX.DXGI.PresentFlags flags)
{
unsafe
{
SharpDX.Result result;
result = TryPresent(syncInterval, flags);
result.CheckError();
return result;
}
}
}
}