Ahoy,
I’m working on an OpenGL ES based game for Android using the NDK. My application is targeted towards SDK 1.6 and above.
I seem to be having a problem creating a canvas of the phones native size. My rendering is done through a native gameloop that uses OpenGL 1.0. I’m using the emulator and that gives me a 480×320 canvas — this is totally fine. Then, when I run the same application on my HTC Desire which has a native resolution of 800×480 I’m getting a canvas of 533×320.
Anyone have any information on how to deal with/solve this? Any other information about this is also appreciated.
Thanks in advance!
You can list the resolutions your game supports in AndroidManifest.xml, by this property. When the device’s resolution is not listed there, Android will scale the viewport (it’s called compatibility mode).