1 /*
2      PLIB - A Suite of Portable Game Libraries
3      Copyright (C) 1998,2002  Steve Baker
4 
5      This library is free software; you can redistribute it and/or
6      modify it under the terms of the GNU Library General Public
7      License as published by the Free Software Foundation; either
8      version 2 of the License, or (at your option) any later version.
9 
10      This library is distributed in the hope that it will be useful,
11      but WITHOUT ANY WARRANTY; without even the implied warranty of
12      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13      Library General Public License for more details.
14 
15      You should have received a copy of the GNU Library General Public
16      License along with this library; if not, write to the Free Software
17      Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
18 
19      For further information visit http://plib.sourceforge.net
20 
21      $Id: ssgStats.cxx 1568 2002-09-02 06:05:49Z sjbaker $
22 */
23 
24 #include "ssgLocal.h"
25 
26 int stats_num_vertices    = 0 ;
27 int stats_isect_triangles = 0 ;
28 int stats_isect_test      = 0 ;
29 int stats_cull_test       = 0 ;
30 int stats_bind_textures   = 0 ;
31 int stats_num_leaves      = 0 ;
32 
33 int stats_hot_triangles   = 0 ;
34 int stats_hot_test        = 0 ;
35 int stats_hot_no_trav     = 0 ;
36 int stats_hot_radius_reject=0 ;
37 int stats_hot_triv_accept = 0 ;
38 int stats_hot_straddle    = 0 ;
39 
40 int stats_los_triangles   = 0 ;
41 int stats_los_test        = 0 ;
42 int stats_los_no_trav     = 0 ;
43 int stats_los_radius_reject=0 ;
44 int stats_los_triv_accept = 0 ;
45 int stats_los_straddle    = 0 ;
46 
47 static char stats_string [ 1024 ] ;
48 
ssgShowStats()49 char *ssgShowStats ()
50 {
51   sprintf ( stats_string, "V=%4d, L=%3d H=%3d IS=%3d IT=%3d HT=%3d CT=%3d BT=%3d\n",
52             stats_num_vertices   ,
53             stats_num_leaves     ,
54             stats_hot_triangles  ,
55             stats_isect_triangles,
56 	    stats_isect_test     ,
57 	    stats_hot_test       ,
58 	    stats_cull_test      ,
59 	    stats_bind_textures  ) ;
60 /*
61   sprintf ( stats_string, "Tri=%d, Tst=%d NoTr=%d Rej=%d Acp=%d Str=%d\n",
62 	    stats_hot_triangles   ,
63 	    stats_hot_test        ,
64 	    stats_hot_no_trav     ,
65 	    stats_hot_radius_reject,
66 	    stats_hot_triv_accept ,
67 	    stats_hot_straddle    ) ;
68 */
69 
70   stats_num_vertices    = 0 ;
71   stats_num_leaves      = 0 ;
72   stats_isect_triangles = 0 ;
73   stats_isect_test      = 0 ;
74   stats_cull_test       = 0 ;
75   stats_bind_textures   = 0 ;
76 
77   stats_hot_triangles   = 0 ;
78   stats_hot_test        = 0 ;
79   stats_hot_no_trav     = 0 ;
80   stats_hot_radius_reject=0 ;
81   stats_hot_triv_accept = 0 ;
82   stats_hot_straddle    = 0 ;
83 
84   stats_los_triangles   = 0 ;
85   stats_los_test        = 0 ;
86   stats_los_no_trav     = 0 ;
87   stats_los_radius_reject=0 ;
88   stats_los_triv_accept = 0 ;
89   stats_los_straddle    = 0 ;
90 
91   return stats_string ;
92 }
93 
94 
95 
96