Wiki Page Content


Use this function to get the brightness (gamma multiplier) for the display that owns a given window.


float SDL_GetWindowBrightness(SDL_Window* window)

Function Parameters


the window used to select the display whose brightness will be queried

Return Value

Returns the brightness for the display where 0.0 is completely dark and 1.0 is normal brightness.

Code Examples

You can add your code example here


Despite the name and signature, this method retrieves the brightness of the entire display, not an individual window. A window is considered to be owned by the display that contains the window's center pixel. (The index of this display can be retrieved using SDL_GetWindowDisplayIndex().)

CategoryAPI, CategoryVideo

None: SDL_GetWindowBrightness (last edited 2014-06-24 23:43:06 by PhilippWiesemann)

Please include your contact information if you'd like to receive a reply.