# HG changeset patch # User John Tsiombikas # Date 1443759019 -10800 # Node ID c6971ff4795eddece52bebee7b8b088b9fa46ea1 # Parent 8f41da60b9f5a43c7b77c6fb162e8f1ab685ea08 screenshot helper code diff -r 8f41da60b9f5 -r c6971ff4795e ios/shots/SIZES --- a/ios/shots/SIZES Fri Oct 02 04:55:54 2015 +0300 +++ b/ios/shots/SIZES Fri Oct 02 07:10:19 2015 +0300 @@ -1,5 +1,9 @@ -3.5 inch: 960x640 -4.0 inch: 1136x640 -4.7 inch: 1334x750 -5.5 inch: 2208x1242 - ipad: 2048x1496 +3.5 inch: 960x640 (1.5) +4.0 inch: 1136x640 (1.775) +4.7 inch: 1334x750 (1.777) +5.5 inch: 2208x1242 (1.778) + ipad: 2048x1496 (1.369) + +shot times: +simple/gui: 32:234 +bump/simple_stereo: 51:102 diff -r 8f41da60b9f5 -r c6971ff4795e ios/shots/grab --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ios/shots/grab Fri Oct 02 07:10:19 2015 +0300 @@ -0,0 +1,25 @@ +#!/bin/sh + +if [ -z "$1" ]; then + name=shot +else + name=$1 +fi + +echo "Capturing iOS applestore shots for: $name" + +echo 'hit enter to capture 3.5" iphone shot (960x640)' +read foo +import ${name}_sz35.jpg +echo 'hit enter to capture 4.0" iphone shot (1136x640)' +read foo +import ${name}_sz40.jpg +echo 'hit enter to capture 4.7" iphone shot (1134x750)' +read foo +import ${name}_sz47.jpg +echo 'hit enter to capture half-res 5.5" iphone shot (1104x621)' +read foo +import ${name}_sz55.jpg && mogrify -resize 2208 ${name}_sz55.jpg +echo 'hit enter to capture half-res ipad shot (1024x748)' +read foo +import ${name}_ipad.jpg && mogrify -resize 2048 ${name}_ipad.jpg diff -r 8f41da60b9f5 -r c6971ff4795e src/glut/main.c --- a/src/glut/main.c Fri Oct 02 04:55:54 2015 +0300 +++ b/src/glut/main.c Fri Oct 02 07:10:19 2015 +0300 @@ -98,11 +98,51 @@ break; case '.': - seektime(250); + seektime(50); + break; + case '>': + seektime(10); + break; + case ']': + seektime(1); break; case ',': - seektime(-250); + seektime(-50); + break; + case '<': + seektime(-10); + break; + case '[': + seektime(-1); + break; + + case '1': + glutReshapeWindow(960, 640); /* 3.5 inch iphone */ + break; + + case '2': + glutReshapeWindow(1136, 640); /* 4.0 inch iphone */ + break; + + case '3': + glutReshapeWindow(1334, 750); /* 4.7 inch iphone */ + break; + + case '4': + glutReshapeWindow(2208, 1242); /* 5.5 inch iphone */ + break; + + case '5': + glutReshapeWindow(2048, 1496); /* ipad2? */ + break; + + case '9': + glutReshapeWindow(1104, 621); /* hald 5.5 inch iphone */ + break; + + case '0': + glutReshapeWindow(1024, 748); /* half ipad2 */ break; default: diff -r 8f41da60b9f5 -r c6971ff4795e src/istereo.c --- a/src/istereo.c Fri Oct 02 04:55:54 2015 +0300 +++ b/src/istereo.c Fri Oct 02 07:10:19 2015 +0300 @@ -138,6 +138,8 @@ dtx_close_font(font); } +static int time_print_pending; + void redraw(void) { float pan_x, pan_y, z; @@ -216,6 +218,11 @@ #endif assert(glGetError() == GL_NO_ERROR); + + if(time_print_pending) { + printf("t: %lds %ldms\n", time_msec / 1000, time_msec % 1000); + time_print_pending = 0; + } } static void render(float t) @@ -443,6 +450,7 @@ paused = !paused; if(paused) { last_pause = sys_msec; + time_print_pending = 1; } else { time_offset -= sys_msec - last_pause; } @@ -450,7 +458,8 @@ void seektime(long msec) { - time_offset -= msec; + time_offset += msec; + time_print_pending = 1; } static unsigned int get_shader_program(const char *vfile, const char *pfile)