1

I'm using Android Studio on a retina MBP to compile desktop apps (mainly though LibGDX). My problem is; is that the applications are being scaled up making them look very blurry.

Now if I turn my resolution to 2560x1600 so that nothing scales the app looks fine. I know you can disable this by getting the app info and disabling the "Disable scaling for retina" option BUT my problem is the app is compiled and run, so there's no app info.

Does ANYONE know how to disable scaling in JAVA apps when it's compiled?

Oliver Dixon
  • 7,012
  • 5
  • 61
  • 95

1 Answers1

1

I figured this out,

In the desktop configuration, you need to add the following arguments to the VM: -Dorg.lwjgl.opengl.Display.enableHighDPI=true

This disables retina scaling so you can utilise high quality textures.

The next problem is that FreeType font is still blurry.

Oliver Dixon
  • 7,012
  • 5
  • 61
  • 95
  • 1
    Thanks a lot, this did the trick! To get libGDX's BitmapFonts to render in the retina solution, simply use a double-sized font and set its scale to 1/2 by calling setScale(.5f) on the font. Cheers! `menlo32Font = new BitmapFont(Gdx.files.internal("fonts/Menlo-64.fnt"),Gdx.files.internal("fonts/Menlo.png"), false); menlo32Font.setScale(0.5f);` – Bensge Dec 13 '14 at 10:58