Wiki Page Content

Differences between revisions 1 and 10 (spanning 9 versions)
Revision 1 as of 2011-03-17 22:53:57
Size: 998
Editor: SheenaSmith
Comment: create page - 3/15 ef1db08c40ac (3/11 006883d5fa51)
Revision 10 as of 2014-06-24 23:45:10
Size: 1330
Comment: Added missing ().
Deletions are marked like this. Additions are marked like this.
Line 3: Line 3:
||<tablewidth="100%" style="color: #FF0000;" :> DRAFT||
Line 6: Line 5:
Use this function to set the brightness (gamma correction) for a window. Use this function to set the brightness (gamma multiplier) for the display that owns a given window.
Line 17: Line 16:
||'''window'''||^the window to change^||
||'''brightness'''||the brightness (gamma) value to set, 0.0 to 1.0||
||'''window'''||the window used to select the display whose brightness will be changed||
||'''brightness'''||the brightness (gamma multiplier) value to set where 0.0 is completely dark and 1.0 is normal brightness||
Line 21: Line 20:
Returns 0 on success, or a negative error code on failure; call [[SDL_GetError]]() for more information. Returns 0 on success or a negative error code on failure; call [[SDL_GetError]]() for more information.
Line 29: Line 28:
''You can add useful comments here''

,,This function will fail if setting the brightness is not supported.,,
Despite the name and signature, this method sets 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]]().) The brightness set will not follow the window if it is moved to another display.

SDL_SetWindowBrightness

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

Syntax

int SDL_SetWindowBrightness(SDL_Window* window,
                            float       brightness)

Function Parameters

window

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

brightness

the brightness (gamma multiplier) value to set where 0.0 is completely dark and 1.0 is normal brightness

Return Value

Returns 0 on success or a negative error code on failure; call SDL_GetError() for more information.

Code Examples

You can add your code example here

Remarks

Despite the name and signature, this method sets 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().) The brightness set will not follow the window if it is moved to another display.


CategoryAPI, CategoryVideo

None: SDL_SetWindowBrightness (last edited 2014-06-24 23:45:10 by PhilippWiesemann)

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