cat555
Member
|
ANDROID - (pixel density) Could not render target error
Hi,
I've been testing rendering pixel density (D.density(...)) with Nexus 7, and when using pixel density greater than certain threshold it gives me an error an app closes.
For example, with 1.75 app closes with "could not render target" error in logcat.
I've tested with an LG G2 Mini and works fine with this value... so i see that this may vary across devices...
My question is, how can i pre-check if the device supports some needed value, so i can use it after? For example, my intention is to give options to users... example, choose quality between low (0.75), medium (1), high (1.25), very high (1.5). So, how can i first check if the options will actually work on the device? I just want to show valid options, to avoid unwanted crashes...
Thanks!
|
|
12-11-2014 06:09 PM |
|
Esenthel
Administrator
|
RE: ANDROID - (pixel density) Could not render target error
Hello!
There's no easy way to detect that, as render targets are allocated on demand during rendering phases.
Perhaps you could try analyzing the device resolution, nexus 7 is high res (1920x1080), if you get these resolutions then don't offer higher pixel densities.
You could also try comparing it to D.maxTexSize.
If screen render target size * pixel density size > D.maxTexSize then perhaps the RT creation will fail.
I'll check if this code can be placed into the engine.
|
|
12-12-2014 12:50 AM |
|
Esenthel
Administrator
|
RE: ANDROID - (pixel density) Could not render target error
|
|
12-12-2014 01:16 AM |
|
cat555
Member
|
RE: ANDROID - (pixel density) Could not render target error
Hi,
It's working fine and having integrated in the engine without having to make any checks on my code side is even better
Thanks for your effort and quickness!!!
|
|
12-12-2014 11:49 AM |
|