Hi there, so I'm working on a game and, while the canvas looks perfectly crisp (nearest filtered) in my PC, it doesn't look so in Android:
This is how it should look:
I made sure of:
* The canvas being low resolution (it's 320x180)
* The canvas having the right filter
* For testing, I even manually set the filter to the image itself (the sassy puzzle title) and the result is the same.
Maybe it's an issue related to OpenGL ES? Idk.
Thanks in advance.
[SOLVED] Canvas rendering issue in Android.
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
- alberto_lara
- Party member
- Posts: 372
- Joined: Wed Oct 30, 2013 8:59 pm
[SOLVED] Canvas rendering issue in Android.
Last edited by alberto_lara on Wed Jan 10, 2024 1:40 am, edited 1 time in total.
Re: Canvas rendering issue in Android.
I had the same issue, it's to do with DPI scaling on mobile devices. Create your canvas like this:
Code: Select all
love.graphics.newCanvas(WIDTH, HEIGHT, { dpiscale = 1})
- alberto_lara
- Party member
- Posts: 372
- Joined: Wed Oct 30, 2013 8:59 pm
Re: Canvas rendering issue in Android.
That did the trick, thanks!
As a note, I had to use the same in fonts for the 4th argument (they were still looking glitchy)
As a note, I had to use the same in fonts for the 4th argument (they were still looking glitchy)
Code: Select all
font = love.graphics.newFont('assets/fonts/proggy-tiny/proggy-tiny.ttf', 16, 'normal', 1)
debugFont = love.graphics.newFont('assets/fonts/proggy-tiny/proggy-tiny.ttf', 32, 'normal', 1)
Who is online
Users browsing this forum: Bing [Bot], Google [Bot] and 12 guests