1 /*
2 Copyright (C) 2007, 2010 - Bit-Blot
3
4 This file is part of Aquaria.
5
6 Aquaria is free software; you can redistribute it and/or
7 modify it under the terms of the GNU General Public License
8 as published by the Free Software Foundation; either version 2
9 of the License, or (at your option) any later version.
10
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14
15 See the GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20 */
21 #include "ProfRender.h"
22
prof_print(float x,float y,char * str)23 void prof_print(float x, float y, char *str)
24 {
25 core->print(x, y-1.5f*4, str, 6);
26
27 //Prof_set_report_mode(Prof_HIERARCHICAL_TIME);
28 /*
29 Prof_SELF_TIME: flat times sorted by self time
30 Prof_HIERARCHICAL_TIME: flat times sorted by hierarchical time
31 Prof_CALL_GRAPH: call graph parent/children information
32 */
33 }
34
prof_width(char * str)35 float prof_width(char *str)
36 {
37 int c = 0;
38 float x = 0;
39 while (str[c] != '\0')
40 {
41 c++;
42 x += 1.2f;
43 }
44 x *= 6;
45 return x;
46 }
47
ProfRender()48 ProfRender::ProfRender() : RenderObject()
49 {
50 followCamera = 1;
51 cull = false;
52 alpha = 0.5;
53
54 //Prof_set_report_mode(Prof_CALL_GRAPH);
55 }
56
onRender()57 void ProfRender::onRender()
58 {
59 /*
60 for (int i = 0; i < 20; i++)
61 {
62 core->print(10, 10+i*10, "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890abcdefghijklmnopqrstuvwxyz");
63 }
64 */
65 #ifdef BBGE_BUILD_WINDOWS
66 /*
67 Prof_draw_gl(20, 50, 400, 400, 20, 2, prof_print, prof_width);
68 Prof_draw_graph_gl(430, 50, 2, 8);
69 */
70 #endif
71 }
72
73