Window resize issue with OpenGL

General chat related to ScummVM, adventure gaming, and so on.

Moderator: ScummVM Team

Post Reply
User avatar
Raziel
ScummVM Porter
Posts: 1538
Joined: Tue Oct 25, 2005 8:27 am
Location: a dying planet
Contact:

Window resize issue with OpenGL

Post by Raziel »

I get an issue when using OpenGL in window mode.
Once i resize the window the focus of the game is lost. Even worse is that it's not cured on switching back to fullscreen.

See the bug item here (SDL issue tracker for now)
should window be resizable without FBOs?
User avatar
Raziel
ScummVM Porter
Posts: 1538
Joined: Tue Oct 25, 2005 8:27 am
Location: a dying planet
Contact:

Re: Window resize issue with OpenGL

Post by Raziel »

@botje and devs

I'd really like to get an answer to this, otherwise the SDL devs can't act.
MiniGL doesn't have frame buffer objects. I tested on Linux and without FBOs, window content cannot be resized without FBOs.
Botje
Posts: 207
Joined: Thu Feb 28, 2013 5:48 pm

Re: Window resize issue with OpenGL

Post by Botje »

On desktop we render directly to the default framebuffer (either a window or the full screen), no FBO is involved.
As the native resolution of the games are fixed, there is no reason to allow resizing.
There is also no code path that calls SDL_CreateWindow with the SDL_RESIZABLE flag, so the answer is a solid "no" on all fronts.
User avatar
Raziel
ScummVM Porter
Posts: 1538
Joined: Tue Oct 25, 2005 8:27 am
Location: a dying planet
Contact:

Re: Window resize issue with OpenGL

Post by Raziel »

Botje wrote:On desktop we render directly to the default framebuffer (either a window or the full screen), no FBO is involved.
As the native resolution of the games are fixed, there is no reason to allow resizing.
There is also no code path that calls SDL_CreateWindow with the SDL_RESIZABLE flag, so the answer is a solid "no" on all fronts.
Thanks a lot.
So, window should be permitted entirely from being resized, did i get that right?
Is that done in residualvm or must SDL take care of?
Botje
Posts: 207
Joined: Thu Feb 28, 2013 5:48 pm

Re: Window resize issue with OpenGL

Post by Botje »

I think it is SDL's task to inform the OS this window does not want to be resized.
User avatar
Raziel
ScummVM Porter
Posts: 1538
Joined: Tue Oct 25, 2005 8:27 am
Location: a dying planet
Contact:

Re: Window resize issue with OpenGL

Post by Raziel »

Thank you very much once again.

Will post here if more questions arise.
User avatar
Raziel
ScummVM Porter
Posts: 1538
Joined: Tue Oct 25, 2005 8:27 am
Location: a dying planet
Contact:

Re: Window resize issue with OpenGL

Post by Raziel »

Botje wrote:There is also no code path that calls SDL_CreateWindow with the SDL_RESIZABLE flag.
Hmm, but there is, isn't there?

Please, if you got time, review the PR that deals with my issue.

Thank you very much
Botje
Posts: 207
Joined: Thu Feb 28, 2013 5:48 pm

Re: Window resize issue with OpenGL

Post by Botje »

You are right. I missed the `break` statements that cause it to continue to use this window.

I do not think resizing the window does something useful on the other platforms, so maybe we should disable it altogether.
User avatar
Raziel
ScummVM Porter
Posts: 1538
Joined: Tue Oct 25, 2005 8:27 am
Location: a dying planet
Contact:

Re: Window resize issue with OpenGL

Post by Raziel »

Botje wrote: I do not think resizing the window does something useful on the other platforms, so maybe we should disable it altogether.
I thought so too, but didn't want to change it for all other platforms, since there might have been some other code that deals with them which i wasn't aware of.

I ill adapt the PR. (edit: done)

p.s. i don't know if a comment should be placed there, feel free to add one, if necessary.

Thank you very much
User avatar
Raziel
ScummVM Porter
Posts: 1538
Joined: Tue Oct 25, 2005 8:27 am
Location: a dying planet
Contact:

Re: Window resize issue with OpenGL

Post by Raziel »

Fixed in-tree.

Thank you Botje and bgK
Post Reply