SFML community forums

Help => Graphics => Topic started by: Xander314 on June 13, 2011, 04:55:32 pm

Title: Video Modes and Colour Depth
Post by: Xander314 on June 13, 2011, 04:55:32 pm
For a video tutorial I am making on windowing and video modes, I was wondering what happens when we give our video mode something like 11bit colour.

It is invalid for fullscreen mode, but what happens for windowed applications?

Also, to clarify, when a bad video mode is passed to the window constructor, does it revert to sf::VideoMode::GetDesktopMode()?
Title: Video Modes and Colour Depth
Post by: Laurent on June 13, 2011, 05:49:19 pm
If the pixel depth is not directly supported, the closest valid one is chosen.

Quote
Also, to clarify, when a bad video mode is passed to the window constructor, does it revert to sf::VideoMode::GetDesktopMode()?

Only in fullscreen. In windowed mode you can use any width/height and there's always a valid depth that can be used.
Title: Video Modes and Colour Depth
Post by: Xander314 on June 13, 2011, 05:58:27 pm
So even in windowed mode, the bit depth is corrected to 8/16/32 or something?
Title: Video Modes and Colour Depth
Post by: Laurent on June 13, 2011, 06:08:56 pm
Yes.
Title: Video Modes and Colour Depth
Post by: Xander314 on June 13, 2011, 06:17:34 pm
Thanks :D