Quantcast
Channel: Community | MonoGame - Latest topics
Viewing all articles
Browse latest Browse all 6821

Android scaling

$
0
0

@servvs wrote:

I am running into a great deal of trouble trying to get my app to scale properly with android devices with devices that do not have standard aspect ratios. I am creating a "virtual viewport" as width and height. I designate the height to be 768, and then the width will equal actualScreenWidth / Height * 768 which keeps the size everything being drawn pretty uniform across devices and it seems like that should work with any viewport and keep the image the same size. I draw everything to the virtual viewport and then stretch the viewport to a render target that is the same size as the actual screen resolution. Depending on the aspect ratio of the device, it stretches it sometimes where it shouldn't and it just doesn't come out correctly. Since what I'm attempting isn't working properly, what would be the best way to keep the internal vertical resolution 768 and have the width be dynamic so that it doesn't stretch, but keeps the same size for any resolution?

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 6821

Trending Articles