logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

SDL_HINT_VIDEO_DOUBLE_BUFFER - Tell the video driver that we only want a double buffer.

Availability

       This hint is available since SDL 3.2.0.

Simple Directmedia Layer                           SDL 3.2.10                    SDL_HINT_VIDEO_DOUBLE_BUFFER(3)

Description

       By  default, most lowlevel 2D APIs will use a triple buffer scheme that wastes no CPU time on waiting for
       vsync after issuing a flip, but introduces a frame of latency. On the other hand, using a  double  buffer
       scheme  instead is recommended for cases where low latency is an important factor because we save a whole
       frame of latency.

       We do so by waiting for vsync immediately after issuing a flip, usually just after eglSwapBuffers call in
       the backend's *_SwapWindow function.

       This hint is currently supported on the following drivers:

       • Raspberry Pi (raspberrypi)

       • Wayland (wayland)

       This hint should be set before SDL is initialized.

Header File

       Defined in SDL3/SDL_hints.h

Name

       SDL_HINT_VIDEO_DOUBLE_BUFFER - Tell the video driver that we only want a double buffer.

Synopsis

#include"SDL3/SDL.h"#defineSDL_HINT_VIDEO_DOUBLE_BUFFERSDL_VIDEO_DOUBLE_BUFFER"

See Also