[Not ZDoom] [gzdoom a95edc3] game screen not stretched

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

[gzdoom a95edc3] game screen not stretched

Postby 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.
User avatar
VoidMage
 
Joined: 02 Dec 2010

Re: [gzdoom a95edc3] game screen not stretched

Postby 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.
User avatar
Xaser
anarchivist
 
 
 
Joined: 20 Jul 2003

Re: [gzdoom a95edc3] game screen not stretched

Postby 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.
User avatar
Matt
Putting the XD into *xdeath since 2007
 
Joined: 04 Jan 2004
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia

Re: [gzdoom a95edc3] game screen not stretched

Postby 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 ...
Edward-san
Mathematics is the language with which God has written the universe. (Galilei)
 
Joined: 17 Oct 2009

Re: [gzdoom a95edc3] game screen not stretched

Postby 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)
You do not have the required permissions to view the files attached to this post.
User avatar
VoidMage
 
Joined: 02 Dec 2010

Re: [gzdoom a95edc3] game screen not stretched

Postby 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?
Blzut3
Pronounced: B-l-zut
 
 
 
Joined: 24 Nov 2004
Github ID: Blzut3
Operating System: Debian-like Linux (Debian, Ubuntu, Mint, etc) 64-bit
Graphics Processor: ATI/AMD with Vulkan Support

Re: [gzdoom a95edc3] game screen not stretched

Postby 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...
Edward-san
Mathematics is the language with which God has written the universe. (Galilei)
 
Joined: 17 Oct 2009

Re: [gzdoom a95edc3] game screen not stretched

Postby 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.
Blzut3
Pronounced: B-l-zut
 
 
 
Joined: 24 Nov 2004
Github ID: Blzut3
Operating System: Debian-like Linux (Debian, Ubuntu, Mint, etc) 64-bit
Graphics Processor: ATI/AMD with Vulkan Support

Re: [gzdoom a95edc3] game screen not stretched

Postby 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 ?
User avatar
VoidMage
 
Joined: 02 Dec 2010

Re: [gzdoom a95edc3] game screen not stretched

Postby 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.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany


Return to Closed Bugs

Who is online

Users browsing this forum: No registered users and 2 guests