Skip to content

LiteFX::Rendering::ISwapChain::reset

Causes the swap chain to be re-created. All frame and command buffers will be invalidated and rebuilt.

Synopsis

Declared in <litefx/rendering_api.hpp>

[[dllimport, dllexport]] virtual void reset(
    Format surfaceFormat,
    Size2d const& renderArea,
    UInt32 buffers,
    bool enableVsync = false) = 0;

Description

There is no guarantee, that the swap chain images will end up in the exact format, as specified by surfaceFormat. If the format itself is not supported, a compatible format may be looked up. If the lookup fails, the method may raise an exception.

Similarly, it is not guaranteed, that the number of images returned by images matches the number specified in buffers. A swap chain may require a minimum number of images or may constraint a maximum number of images. In both cases, buffers will be clamped.

Parameters

NameDescription
surfaceFormatThe swap chain image format.
renderAreaThe dimensions of the frame buffers.
buffersThe number of buffers in the swap chain.
enableVsynctrue, if vertical synchronization should be used, otherwise false.

See Also

multiSamplingLevel