sdlSetRenderHdrHeadroom function render

bool sdlSetRenderHdrHeadroom(
  1. Pointer<SdlRenderer> renderer,
  2. double headroom
)

Set the HDR headroom for render output.

The HDR headroom is used to set the HDR metadata for HDR10 output and for tone mapping textures that are set to a higher headroom.

By default the HDR headroom comes from the window associated with the renderer, but this function allows you to override that and set a specific value.

\param renderer the rendering context. \param headroom the HDR headroom to use, or 0 to use the window headroom. \returns true on success or false on failure; call SDL_GetError() for more information.

\threadsafety This function should only be called on the main thread.

\since This function is available since SDL 3.6.0.

\sa SDL_GetRenderHDRHeadroom

extern SDL_DECLSPEC bool SDLCALL SDL_SetRenderHDRHeadroom(SDL_Renderer *renderer, float headroom)

See also:

Implementation

bool sdlSetRenderHdrHeadroom(Pointer<SdlRenderer> renderer, double headroom) {
  final sdlSetRenderHdrHeadroomLookupFunction = _libSdl
      .lookupFunction<
        Bool Function(Pointer<SdlRenderer> renderer, Float headroom),
        bool Function(Pointer<SdlRenderer> renderer, double headroom)
      >('SDL_SetRenderHDRHeadroom');
  return sdlSetRenderHdrHeadroomLookupFunction(renderer, headroom);
}