GREM 3.12.0
Game/Rendering Engine Modules for C++
Loading...
Searching...
No Matches
grem::graphics::SwapchainOptions Struct Reference

Configuration options for a Swapchain. More...

#include <GREM/graphics/Swapchain.hpp>

Public Attributes

uint32_t maxBufferedFrameCount = 0
 Maximum number of additional swapchain frames to buffer and render while waiting for the oldest submitted frame to finish being rendered.
bool useVerticalSynchronization
 Whether the swapchain should use vertical synchronization (VSync) or not.

Detailed Description

Configuration options for a Swapchain.

Member Data Documentation

◆ maxBufferedFrameCount

uint32_t grem::graphics::SwapchainOptions::maxBufferedFrameCount = 0

Maximum number of additional swapchain frames to buffer and render while waiting for the oldest submitted frame to finish being rendered.

Higher values may improve average framerate and frametime consistency at the cost of potentially higher input lag.

Note
Recommended values are:
  • 0 to prioritize low input lag, or
  • 1 to prioritize smoothness.
This option only applies to certain graphics backends.

◆ useVerticalSynchronization

bool grem::graphics::SwapchainOptions::useVerticalSynchronization
Initial value:
=
false

Whether the swapchain should use vertical synchronization (VSync) or not.

VSync ensures that any frame submitted for presentation is delayed until the previously submitted frame has finished being presented. This eliminates the tearing artifacts that may otherwise occur due to swapping the front buffer in the middle of a screen refresh, at the cost of higher latency and potentially limiting the frame rate.

Note
Enabling VSync is not recommended for applications that are sensitive to input lag, like first person games, since it can introduce a significant amount of latency.

The documentation for this struct was generated from the following file: