[gzdoom a95edc3] game screen not stretched

Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: [gzdoom a95edc3] game screen not stretched

Re: [gzdoom a95edc3] game screen not stretched

by Graf Zahl » Fri Jan 30, 2015 2:14 am

The start screen is letterboxed because otherwise it'd be distorted on widescreen displays. For the game we obvoiusly want it to fill the entire screen.

Re: [gzdoom a95edc3] game screen not stretched

by VoidMage » Fri Jan 30, 2015 1:25 am

Well, I - to a point - do agree, that FULLSCREEN_DESKTOP approach of sdl2 has certain advantages, even if taking the account for the pain of adjusting the old code to it.
Also, I've been wondering for quite awhile - why is the start screen letterboxed, but not the actual game ?
And again, why if you open console on the initial screen, you can't go back to "title screen without menu" state, instead Escape switches between menu and console ?

Re: [gzdoom a95edc3] game screen not stretched

by Blzut3 » Thu Jan 29, 2015 6:28 pm

For what it's worth the Cocoa backend also does "fullscreen window" mode. I assume it does the same for GZDoom OS X.

Re: [gzdoom a95edc3] game screen not stretched

by Edward-san » Thu Jan 29, 2015 2:35 pm

At a quick glance to the posted patch, imho you don't have to call SDL code call in gl/ , which should be platform neutral. The best way would be to make a virtual function in the FGLRenderer class which does nothing in win32 derived but does what you added in sdl derived , though I'm having doubts about the approach...

Re: [gzdoom a95edc3] game screen not stretched

by Blzut3 » Thu Jan 29, 2015 2:15 pm

Probably best to continue this on the proper forum/repository.

I will note if you can't figure out how to do scaling, the GL framebuffer code could be adjusted to change the resolutions as before. I don't think there are many dependencies outside of the frame buffer that assume the new behavior. Maybe the mouse coordinates?

Re: [gzdoom a95edc3] game screen not stretched

by VoidMage » Wed Jan 28, 2015 2:22 am

OK, good catch - I didn't know about vid_renderer (thought the whole software mode was removed).

Anyway, software mode isn't affected.

So, which part of GL code does the stretching ?

...

Thanks to some helpful people on #SDL I've made some progress.
glViewport in SDL1 worked under assumption that for a fullscreen window size (GetWidth(), GetHeight(), GetTrueHeight) == resolution.
With SDL_WINDOW_FULLSCREEN_DESKTOP, that's by no means true, though I'm not quite sure yet how to properly query for SDL_GetDesktopDisplayMode in relevant files; also, best I get now is partial screen due to borders getting cleared to window size.

...

This is how far I got in the meanwhile. The patch is *obviously* incorrect, but there is some significant progress.
- initial screen is still broken, but the top left corner seems to be in its proper place and the texture, while clipped, seems right size
- load/save screens are almost completely messed up
- in-game, there's no sky/hud and it *might* not be stretched to the correct ratio, but the scene takes most of the screen; the menu is still clipped
- the changes were done mostly blind, so some might be redundant; couldn't figure the difference between GetHeight and GetTrueHeight, but it seemed to be no difference between them in linux code (also, there might not be any while fullscreen);
- the change in gl/system/gl_framebuffer.cpp is completely bogus, as it seems that either screen can't be queried at that point or is yet uninitialized,
so IsFullscreen() didn't seem to work (I need to recheck that...OK, retested, seems IsFullscreen() is OK there after all; not updating the patch yet though)
Attachments
gzdoom-sdl2-desktop-fullscreen.patch.gz
preliminary patch
(1.16 KiB) Downloaded 40 times

Re: [gzdoom a95edc3] game screen not stretched

by Edward-san » Tue Jan 27, 2015 1:56 pm

then you don't need to tag this thread as 'gzdoom', if you can reproduce this in zdoom ...

Re: [gzdoom a95edc3] game screen not stretched

by Matt » Tue Jan 27, 2015 11:34 am

Are you sure it's only GZDoom and not ZDoom? And if it's only GZDoom is it only in GL?

I ask because I only recently posted a GZDoom bug here, then realized what I did, deleted it, posted on the GZDoom forums, then found out the problem existed for ZDoom as well and had to delete and repost again.

Re: [gzdoom a95edc3] game screen not stretched

by Xaser » Tue Jan 27, 2015 11:15 am

Before someone with poor social skills gets to this thread, I'll jump in and post the obligatory link: GZDoom bug reports belong on the (somewhat-obscure) GZDoom bug forum.

Looking at the bug posting guidelines, I'm kinda shocked that there's no dedicated item for this (just a passing mention in another item, and no link at all to GZDoom's bug forums) -- something really oughta be done about that. That won't mean everyone will actually read it, of course, but it can certainly be made 10x more obvious than it is now.

[gzdoom a95edc3] game screen not stretched

by VoidMage » Tue Jan 27, 2015 8:41 am

I think this happened upon switch to SDL2, but the commits are a bit too intermixed by now for a simple test (yeah, I kinda overslept this by a few weeks).
On linux with an old integrated intel, with desktop of 1440x900 and gzdoom set to 800x600 and fullscreen, the game screen isn't stretched to the full screen, instead it's (most likely) 800x600 with the bottom left corner in its proper place, while the rest of screen area is black.

Top