[gzdoom a95edc3] game screen not stretched

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

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.
User avatar
VoidMage
Posts: 165
Joined: Thu Dec 02, 2010 10:42 am

[gzdoom a95edc3] game screen not stretched

Post by VoidMage »

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.
User avatar
Xaser
 
 
Posts: 10771
Joined: Sun Jul 20, 2003 12:15 pm

Re: [gzdoom a95edc3] game screen not stretched

Post by Xaser »

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.
User avatar
Matt
Posts: 9693
Joined: Sun Jan 04, 2004 5:37 pm
Preferred Pronouns: They/Them
Operating System Version (Optional): Debian Bullseye
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia

Re: [gzdoom a95edc3] game screen not stretched

Post by Matt »

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.
Edward-san
Posts: 1774
Joined: Sat Oct 17, 2009 9:40 am

Re: [gzdoom a95edc3] game screen not stretched

Post by Edward-san »

then you don't need to tag this thread as 'gzdoom', if you can reproduce this in zdoom ...
User avatar
VoidMage
Posts: 165
Joined: Thu Dec 02, 2010 10:42 am

Re: [gzdoom a95edc3] game screen not stretched

Post by VoidMage »

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)
You do not have the required permissions to view the files attached to this post.
Blzut3
 
 
Posts: 3108
Joined: Wed Nov 24, 2004 12:59 pm
Graphics Processor: ATI/AMD with Vulkan/Metal Support

Re: [gzdoom a95edc3] game screen not stretched

Post by Blzut3 »

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?
Edward-san
Posts: 1774
Joined: Sat Oct 17, 2009 9:40 am

Re: [gzdoom a95edc3] game screen not stretched

Post by Edward-san »

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...
Blzut3
 
 
Posts: 3108
Joined: Wed Nov 24, 2004 12:59 pm
Graphics Processor: ATI/AMD with Vulkan/Metal Support

Re: [gzdoom a95edc3] game screen not stretched

Post by Blzut3 »

For what it's worth the Cocoa backend also does "fullscreen window" mode. I assume it does the same for GZDoom OS X.
User avatar
VoidMage
Posts: 165
Joined: Thu Dec 02, 2010 10:42 am

Re: [gzdoom a95edc3] game screen not stretched

Post by VoidMage »

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 ?
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 48597
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: [gzdoom a95edc3] game screen not stretched

Post by Graf Zahl »

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.

Return to “Closed Bugs [GZDoom]”