glob3mobile / g3m

The multiplatform advanced visualization framework
http://www.glob3mobile.com/
Other
116 stars 56 forks source link

New support for retina screens #195

Closed DiegoGomezDeck closed 7 years ago

DiegoGomezDeck commented 8 years ago
DiegoGomezDeck commented 8 years ago

@amazingsmash Please take some time to review and test this PR.

amazingsmash commented 8 years ago

Hi @DiegoGomezDeck !

I've finally found some time for the PR. Here is what I can tell you so far...

DeviceAttitude_Android.java A bit of cleanup was needed indeed. The minor logic addition on startTrackingDeviceOrientation() seems reasonable. I don't remember exactly what was being suppressed from Lint but now the code is warning-free. Attitude tracking keeps working well on my device (low pass filter is still a rough solution).

Canvas: TextUtils: The paint flags that you have added seem reasonable. I think is noticeable some antialiasing on the marks with text on Android. The rendering of many labels keeps running smoothly, however I'm not sure how these flags affect performance. Have you considered making them optional on Canvas_Android constructor? Digging in the code, I fail to understand the meaning of getDevicePixelRatio() on Android. What is that 150? Changes on iOS seemed ok and are very pleasant to see in action on my iOS device. :) As on Android, I think we might consider make antialiasing, smoothness and interpolation parametric. Is the use of a logicalResolution on WebGL necessary? Is not the provided canvas size the maximum resolution we need to render? Shouldn't the parameter retina of Canvas be renamed to something like "subpixeled" or "onscreen"? NonOverlapping marks seem to keep working the same way.

I've skipped the changes on PointCloudRenderer and related classes as I'm not so familiar with that logic. The "Loudon" demo seems to be down for me to check.

Regards.