[Ubuntu] Fullscreen behavior depending on OpenGL driver?

Hello!

If I fullscreen my SDL2 application (flags = SDL_WINDOW_FULLSCREEN|SDL_WINDOW_OPENGL) it get’s displayed below the Unity top bar from Ubuntu. This happens only with a NVidia driver, using a Nouveau driver is OK. In a virtual machine this also works properly. Any thoughts on this?

I noticed the flag SDL_WINDOW_FULLSCREEN_DESKTOP. What difference does it make compared to SDL_WINDOW_FULLSCREEN? Could you please point me to some documentation about these flags?

And a last question (thank you!!), could you point me to some documentation how fullscreening works under X11/OpenGL? My next problem is that I have two OpenGl programs in fullscreen, that fight each other.

Thanks a lot!!

Regards,
jc

2014-08-08 8:09 GMT-03:00, beauman <jc.lache at gmail.com>:

I noticed the flag SDL_WINDOW_FULLSCREEN_DESKTOP. What difference does it
make compared to SDL_WINDOW_FULLSCREEN? Could you please point me to some
documentation about these flags?

SDL_WINDOW_FULLSCREEN_DESKTOP always uses the current video mode no
matter what (if you pass a different resolution the renderer will
scale things), SDL_WINDOW_FULLSCREEN actually attempts to switch the
video mode.

Thanks for the info! Is there a good place where I could read some details about this?

2014-08-14 4:44 GMT-03:00, beauman <jc.lache at gmail.com>:

Thanks for the info! Is there a good place where I could read some details
about this?

There really isn’t much more to it than what I said… Just that
SDL_WINDOW_FULLSCREEN_DESKTOP tends to be a lot more stable since it’s
basically just a normal window stretched to fill the entire screen.

Just note that if you try to use a resolution that doesn’t match the
current one, the renderer will scale the graphics accordingly, and if
the resolution you requested doesn’t have the same ratio as the real
one, it will get letterboxed. Also, if you aren’t using a renderer
(e.g. you’re using OpenGL) you’ll have to cope with the real
resolution yourself.

Thanks Sik for all the information!

I do prefer SDL_WINDOW_FULLSCREEN_DESKTOP because of the reasons you stated.
Switching resolutions can be tricky, especially if you have more than one application in fullscreen mode,
and it often doesn’t even make sense. Often the canvas can be scaled to the native resolution,
it’s just a question of resolution settings.

OK, that answered my questions. I’ll close this question now. Thanks!