Cool VL Viewer forum

View unanswered posts | View active topics It is currently 2024-03-28 14:38:30



Reply to topic  [ 5 posts ] 
Windows 10 scaling and viewer resolution in window mode 
Author Message

Joined: 2015-08-15 22:31:54
Posts: 10
Reply with quote
For a 3840 x 2160 display I use a scaling size of 175% on Windows 10 (1703). However, the viewer in window mode lowers the resolution in response to the scaling size.

If I want full resolution in the viewer, I have to reduce the Windows 10 scaling to 100%. But with 100% scaling, the desktop and other applications are hardly usable, because of tiny icons and font.

The official and some other viewers in window mode handle the viewer resolution independently of the Windows 10 scaling feature. Of course I would rather like to go on using the Cool VL Viewer.


2017-07-01 19:38:06
Profile

Joined: 2011-10-07 10:39:20
Posts: 181
Reply with quote
Windows applications decide based on their application manifest if they should scale things or not (e.g. opt in), or one can use an API call to do that and declare DPI-Awareness.

https://msdn.microsoft.com/en-us/library/windows/desktop/dn469266(v=vs.85).aspx

So one quick fix would be to embed a different manifest that just declares 'DPI-Aware' to be true, but you would get tiny menus, text and icons in the viewer, as those wouldn't scale up anymore. But as the viewer is basically a Open GL rendering surface anyway, it should be easy to just render UI components larger there and opt-out of the scaling.

If you wanted to do the quick fix yourself, you could use the mt.exe program from the Microsoft Windows SDK to merge a DPI aware Manifest into your installation. The link above has the detailed instructions, copied here for your convenience:

1. Put this content in a file called "DeclareDPIAware.manifest" and save it in the same directory as the CoolVLViewer.exe file.
Code:
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" >
  <asmv3:application>
    <asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">
      <dpiAware>true</dpiAware>
    </asmv3:windowsSettings>
  </asmv3:application>
</assembly>


2. Get mt.exe from the Windows SDK or a Visual Studio install
3. Open a command prompt and run the following (with Administrator rights, if your viewer is installed in the default location inside Program Files.), replace the version with the correct dir for your install:

cd %ProgramFiles(x86)%\CoolVLViewer-<version>
mt.exe -inputresource:CoolVLViewer.exe;#1 -out:extracted.manifest
mt.exe -manifest extracted.manifest DeclareDPIAware.manifest -out:merged.manifest
mt.exe -outputresource:CoolVLViewer.exe;#1 -manifest merged.manifest

Once you start the viewer after this, it will no longer scale things up. If you want to go back, install the old, unpatched CoolVLViewer.exe again.


2017-07-03 20:13:41
Profile

Joined: 2009-03-17 18:42:51
Posts: 5523
Reply with quote
kathrine wrote:
Windows applications decide based on their application manifest if they should scale things or not (e.g. opt in), or one can use an API call to do that and declare DPI-Awareness.

https://msdn.microsoft.com/en-us/library/windows/desktop/dn469266(v=vs.85).aspx
Thanks for the pointer, it allowed me to quickly find what needed to be backported from LL's viewer. Done, for next release. However, I won't backport automatic UI scaling based on Windows' own settings.

Quote:
you would get tiny menus, text and icons in the viewer, as those wouldn't scale up anymore. But as the viewer is basically a Open GL rendering surface anyway, it should be easy to just render UI components larger there and opt-out of the scaling.
You can already scale the viewer UI, from the general tab of the viewer Preferences floater. Of course, scaling to a non-multiple will cause a blurriness in the UI elements...
That's why it is recommended to avoid using any such scaling (both at the OS and program level): if you need to scale up from the OS to see things, you obviously bought a monitor which screen is either not large enough, or which resolution is unreasonably and uselessly too high for the monitor size... The DPI of a monitor (for a normal viewing distance, i.e. 60cm/2ft) should be somewhere between 90 and 100 dpi. Anything larger is a total waste of resources (GPU power, memory, etc) and money, since you won't be able to discriminate two (or even three) neighbouring pixels on the screen !

It always baffled me to see monitor makers proposing such ridiculously high DPI settings... and people buying them...


2017-07-03 22:36:56
Profile WWW

Joined: 2015-08-15 22:31:54
Posts: 10
Reply with quote
Thank you so much for the detailed instruction, Kathrine! It works (after some trial and error) and is full resolution now. The UI size I increased in the viewer preferences general settings.
I am very happy :)

Thank you very much too, Henri, for the work!

(I got the monitor because I needed a new one anyhow and I wanted pixel-free view, which I have now. It does not even need anti aliasing activated in the viewer.
Anything bigger than the cheapest 28 inch one that I bought would have been way too expensive.)


2017-07-03 23:04:10
Profile

Joined: 2009-03-17 18:42:51
Posts: 5523
Reply with quote
Julia wrote:
I got the monitor because I needed a new one anyhow and I wanted pixel-free view, which I have now.
For a 28", anything beyond 2560x1440 pixels (104 DPI) is unreasonable and does not bring anything to the image quality, unless you bring your nose in contact with the screen and are myopic enough to get a clear view of the pixels at this distance (which is very unlikely :lol: )...

Quote:
It does not even need anti aliasing activated in the viewer.
You bet... However, your GPU got much more work and uses much more memory rendering at 3840x2160 without AA than with 4xAA at 2560x1440, for the same result... The viewer also uses more RAM as the display resolution increases, and gets slower as well...

Quote:
Anything bigger than the cheapest 28 inch one that I bought would have been way too expensive.
A 2560x1440 would have costed you much less, and even a 31" 2560x1440 monitor (95 DPI) would have done the job for less money...


2017-07-04 08:41:23
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 5 posts ] 

Who is online

Users browsing this forum: No registered users and 36 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software.