Hashlink's resolution is sharper than release (Windows 10 + gcc)

I used hashlink to generate my c-files and then I use hlc-compiler to use gcc to get the executable for release. I tried different optimizations like -O1, -O2, -O3, however as you should see in the picture the pixel resolution is sharper when using hashlink than it is running the .exe release.

resolution between hl and gcc -O3 differs
(the front window is hashlink)

Thank you. :slight_smile:

Further information

My hlc-compile command (for cmd or .bat):

haxelib run hlc-compiler --srcDir ./ --outDir ../exe/ --hlLibDir "C:\Programs\HaxeToolkit\haxe\lib\hashlink\hl-1.11.0-win" --hlIncludeDir "C:\Programs\HaxeToolkit\haxe\lib\hashlink\hashlink-master\src" --copyRuntimeFiles --exFile C:\Windows\System32\dbghelp.dll -O3

see also: Options for gcc and optimization

This concerns not only Hashlink. Html5/JavaScript is as sharp as HL.

Seems like a problem with your scene that scales to fix a bigger window. Scaling pixel perfect text will create such blurry result.

If it’s not a huge deal, could you give a little bit more information (maybe steps) on how to compile to exe. I’m having a hard time getting it to work. I get “Access Violation” which could be because I’m not setting up the PAK system right… any info or links would be greatly appreciated!

Hi! I’m not sure if this is exactly a “sharp graphics” issue, you could open a new thread instead …
I didn’t use the PAK system so at the moment I can’t share any knowledge about that. (Idk maybe Cannasse can)
Usually most heaps people hang out in the discord channel.

Update on this topic with new understanding.

The topic’s heading shouldn’t have “gcc” as I didn’t use it here.

HLCC internally relies on MSVC’s cl.exe.
I have too much stuff on my machine. Though I had MinGW-w64 (GCC) installed, HLCC never used it. Instead it found my MVS 2019, which I had forgotten I also had installed. That means also I gave the cl-compiler input from the gcc-compiler and explains why some compiler options (maybe) worked and others didn’t: They were either the same in both compilers (like O1, O2, O3…), ignored (handled by HLCC itself) or different and incompatible.

That means I have this blurry/bloated graphics issue with MSVC/cl.exe. I retried compiling manually with many different approaches (also changing the .hxml-file using -lib hldx, -D highDPI etc.) and couldn’t figure out the problem. But I guess when specifying any window size (like -D windowSize=800x600) that should be binding from software development perspective.

Nevertheless I could get around the bloated graphics issue by just using redistHelper.