VIDEO - OpenGL Fullscreen/Desktop Fix (SDL1)

Here you can discuss the development of patches.

VIDEO - OpenGL Fullscreen/Desktop Fix (SDL1)

Postby truth_deleted » 2013-7-29 @ 09:44

There are two options for fullresolution while output=openglnb: desktop or original. Original is typically the low resolution source, while fullresolution=desktop scales a high quality image to full screen. This is an ideal configuration for DOS/VGA games and especially for Win95 games. However, the image was not scaling while running a 95 guest nor games inside the guest; instead the image appeared as a small window on a black background.

Attached is a patch against DOSBox 0.74/SVN to fix this issue. I can now run Win9x games inside DOSBox and have a high quality fullscreen image (fullresolution=desktop). This patch should also work for DOS games which do not scale to fullscreen while fullresolution=desktop. It's a minor edit to code, but consider it a test patch until its compatibility is verified.
You do not have the required permissions to view the files attached to this post.
truth_deleted
 

Re: OpenGL Fullscreen/Desktop Fix

Postby robertmo » 2013-7-29 @ 21:21

the patch simply allows opengl stretching images using color higher than 8-bit
fixed after so many years ;)

fullresolution has more options - you can set here any resolution you want same as with windowresolution
you can use it with vgaonly and hqnx and windowresolution too

One bug i found is hqnx has problems with aspect true - makes image twice taller.
User avatar
robertmo
l33t
 
Posts: 4234
Joined: 2003-6-18 @ 10:35

Re: OpenGL Fullscreen/Desktop Fix

Postby NY00123 » 2013-7-29 @ 21:30

Some scalers, and possibly emulated high-res graphic modes as well (say 15-bpp or more), are designed with the RGBA color format (on the host side) in mind, while DOSBox' OpenGL output currently uses BGRA. Furthermore, although less relevant to this specific patch, the Overlay output has its own unique color format (a variant of YUV). This is one reason for forcing Surface output on some occassions.

So, while the patch may seem to work now, there may still be cases where you get the wrong colors. (And then there may be more problems I haven't thought about, like the one described by robertmo in the last reply.)
NY00123
Member
 
Posts: 219
Joined: 2010-2-13 @ 19:42

Re: OpenGL Fullscreen/Desktop Fix

Postby robertmo » 2013-7-29 @ 22:06

Does gulikoza's openglhq patch handle RGBA somehow?
User avatar
robertmo
l33t
 
Posts: 4234
Joined: 2003-6-18 @ 10:35

Re: OpenGL Fullscreen/Desktop Fix

Postby Dominus » 2013-7-29 @ 22:28

Moved to patches forum
User avatar
Dominus
DOSBox Moderator
 
Posts: 7540
Joined: 2002-10-03 @ 09:54
Location: Vienna or Ludwigsburg

Re: OpenGL Fullscreen/Desktop Fix

Postby truth_deleted » 2013-7-30 @ 04:27

Thank you both for testing the code change and for documenting the nature of the original issue. It is a good insight that this is color depth specific. It should be possible to enable the code change only when running at high color depths, given the minor patch causes any significant issues in DOS games, whether related to aspect mode or color space. In the case this is necessary, one simple and coarse fix would be to try a conditional statement detecting color depth.

I did verify that I am unable to reproduce the bug while setting hqnx/aspect=true. I suspect this is related to detection of the screen size, but we can continue to test.
truth_deleted
 

Re: OpenGL Fullscreen/Desktop Fix

Postby robertmo » 2013-7-30 @ 04:54

truth5678 wrote:I did verify that I am unable to reproduce the bug while setting hqnx/aspect=true. I suspect this is related to detection of the screen size, but we can continue to test.

aspect=true has to work (so original has to be in 320x200 (most dos games) or 640x400 or some other more rare resolution (Quake allows choosing from many)
User avatar
robertmo
l33t
 
Posts: 4234
Joined: 2003-6-18 @ 10:35

Re: OpenGL Fullscreen/Desktop Fix

Postby truth_deleted » 2013-7-30 @ 05:00

I reproduced the bug. It occurs when fullresolution=original, aspect=true, while full screen. Can you verify that aspect=false isn't preserving the true aspect ratio? It does for me.

Also, this bug existed before my code change. I have the same bug in an unmodified copy of dosbox.
truth_deleted
 

Re: OpenGL Fullscreen/Desktop Fix

Postby NY00123 » 2013-7-30 @ 07:52

For some emulated video modes, it seems like the aspect setting is ignored (i.e. aspect=false is practically forced). For textual modes this is done by design. For any graphical modes where this is reproduced it is probably a bug. An example of a game for which the bug is reproduced is Rayman (along with a few variants of that game).
NY00123
Member
 
Posts: 219
Joined: 2010-2-13 @ 19:42

Re: OpenGL Fullscreen/Desktop Fix

Postby truth_deleted » 2013-7-30 @ 09:27

That's very interesting. It is reasonable to document these opengl mode issues in games and their display configurations, especially given the importance of a cross-platform output mode.
truth_deleted
 


Return to DOSBox Patches

Who is online

Users browsing this forum: No registered users and 2 guests