clray

diff src/rt.cc @ 50:d3c46803242e

- added button to stop the timing messages
author John Tsiombikas
date Tue, 31 Aug 2010 02:54:37 +0100
parents 30bf84881553
children 55b30d8b6805
line diff
     1.1 --- a/src/rt.cc	Tue Aug 31 01:28:20 2010 +0100
     1.2 +++ b/src/rt.cc	Tue Aug 31 02:54:37 2010 +0100
     1.3 @@ -60,6 +60,8 @@
     1.4  static long timing_sample_sum;
     1.5  static long num_timing_samples;
     1.6  
     1.7 +extern bool dbg_frame_time;
     1.8 +
     1.9  
    1.10  bool init_renderer(int xsz, int ysz, Scene *scn, unsigned int tex)
    1.11  {
    1.12 @@ -193,7 +195,9 @@
    1.13  	timing_sample_sum += msec;
    1.14  	num_timing_samples++;
    1.15  
    1.16 -	printf("rendered in %ld msec\n", msec);
    1.17 +	if(dbg_frame_time) {
    1.18 +		printf("rendered in %ld msec\n", msec);
    1.19 +	}
    1.20  	return true;
    1.21  }
    1.22