Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Video Modes and Colour Depth  (Read 2255 times)

0 Members and 1 Guest are viewing this topic.

Xander314

  • Jr. Member
  • **
  • Posts: 67
    • View Profile
    • http://sfmlcoder.wordpress.com/
    • Email
Video Modes and Colour Depth
« 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()?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Video Modes and Colour Depth
« Reply #1 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.
Laurent Gomila - SFML developer

Xander314

  • Jr. Member
  • **
  • Posts: 67
    • View Profile
    • http://sfmlcoder.wordpress.com/
    • Email
Video Modes and Colour Depth
« Reply #2 on: June 13, 2011, 05:58:27 pm »
So even in windowed mode, the bit depth is corrected to 8/16/32 or something?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Video Modes and Colour Depth
« Reply #3 on: June 13, 2011, 06:08:56 pm »
Yes.
Laurent Gomila - SFML developer

Xander314

  • Jr. Member
  • **
  • Posts: 67
    • View Profile
    • http://sfmlcoder.wordpress.com/
    • Email
Video Modes and Colour Depth
« Reply #4 on: June 13, 2011, 06:17:34 pm »
Thanks :D

 

anything