Author Topic: No antialiasing when running my app outside the IDE  (Read 2807 times)

0 Members and 1 Guest are viewing this topic.

Offline Raven_Singularity

  • Forum Regular
  • Posts: 158
    • View Profile
No antialiasing when running my app outside the IDE
« on: April 06, 2019, 11:09:07 pm »
I have been developing a keyframe animation library for QB64 the past months.  So far so good, I can place text, images, and sounds on a timeline, and move them around, scale them, change colour and opacity levels, etc.

The problem is as soon as I run my app's .exe file outside of the IDE, it no longer antialiases text or images, and looks horrible.  All text and images are blocky and ugly.  I am running the same .exe that the IDE compiled and ran, so I don't know why it is producing different results when run standalone.

This issue will prevent me from distributing my app, as I don't want to give out something that looks like garbage.

Any tips?


Edit:

So I figured out the issue, yet another issue with using Windows on a 4K display!  Blah.

In order to make most apps work on a 4K display, I need to go into the "Compatibility" section and select "Override high-DPI scaling behaviour, Scaling performed by: Application".  Otherwise most apps are broken and unusable.  With QB64 IDE, I had already selected this option.  But when running the compiled EXE outside the IDE, it was no longer overriding the scaling option.

It would be nice if QB64 updated itself to force "Application Scaling" and ignore Windows 10 pixel scaling, it completely breaks QB64.  Even the QB64 IDE is unusable without overriding this option, it will turn many people away from using it if it doesn't work out of the box (it has horrendously pixelated text on by default, that can barely be read).
« Last Edit: April 06, 2019, 11:17:03 pm by Raven_Singularity »

Offline Petr

  • Forum Resident
  • Posts: 1720
  • The best code is the DNA of the hops.
    • View Profile
Re: No antialiasing when running my app outside the IDE
« Reply #1 on: April 07, 2019, 03:14:35 am »
Try use some from this combinations after SCREEN call:

            _FULLSCREEN _STRETCH
            _FULLSCREEN _SQUAREPIXELS
            _FULLSCREEN _STRETCH, _SMOOTH
            _FULLSCREEN _SQUAREPIXELS, _SMOOTH
« Last Edit: April 07, 2019, 03:19:36 am by Petr »

Offline Raven_Singularity

  • Forum Regular
  • Posts: 158
    • View Profile
Re: No antialiasing when running my app outside the IDE
« Reply #2 on: April 08, 2019, 03:45:34 pm »
This is an issue with Microsoft desktop technology trying to be compatible with high-DPI tablets.  I want to use pixels as-is, but Windows by default forces stupid DPI settings onto apps, making text and images appear heavily aliased, and frequently the screen gets cut off.  With a maximum resolution of 1080p Windows 10 behaves fairly normally, but as soon as you increase the DPI (3840x2160) it breaks everything.

There is a way for apps to tell Windows 10 to not do automatic DPI scaling.  QB64 should enable this option by default so things don't look terrible for high-DPI Windows 10 users.  QB64 already provides a way to scale the IDE font size, so there is zero benefit to allowing Windows to scale fonts/images itself, it just breaks things.

I'm aware this is a cross-platform app, but a lot of people use it on Windows 10, so it seems worthwhile to fix this issue.  It doesn't affect many people yet, but when it does affect people it renders QB64 unusable.