Results 1 to 8 of 8

Thread: Android: Support all aspect ratios

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #6
    There is one method, but you need to modify the code of ZenGL and do some calculation E.g. you have real resolution 1280x720. This is a 16:9 aspect. Take any demo, there is resolution 800x600. For aspect 16:9 you need only 800x450. So, you call in your Init this:
    Code:
    zgl_Enable( CORRECT_RESOLUTION );
    scr_CorrectResolution( 800, 450 );
    But as a result you won't see the bottom of scene. E.g. you need to see center of it, so open scr_CorrectResolution and add there this line(before SetCurrentMode):
    Code:
    scrAddCY := Round( -75 * scrResCY );
    -75 - this is ( 600 - 450 ) / 2. So, if idea is clear then you can modify the code a bit an extend it for your needs
    Last edited by Andru; 08-05-2014 at 07:25 AM.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •